• AVR Freaks

Helpful ReplyHot!Does MPLAB X support programming in PIC assembler?

Page: < 1234 Showing page 4 of 4
Author
oliverb
Super Member
  • Total Posts : 414
  • Reward points : 0
  • Joined: 2009/02/16 13:12:38
  • Location: 0
  • Status: online
Re: Does MPLAB X support programming in PIC assembler? 2021/01/15 01:47:22 (permalink)
0
The long bit names are not really the fault of the assembler though, surely you could use the pedantic definitions in MPASM just as easily. Its more like a trend towards stamping out any ambiguity in definitions, at the expense of making everything 3x longer.
 
I suppose as long as a PIC just had one status register, one timer, one usart etc the issue of bit definitions needing to "belong" to the specific register didn't arise. Having said that I've had to break my own habit of single-letter variable names due to the number of times you get name collisions in embedded environments
 
The alternative seems to be to wedge in higher-level language constructs (such as bit fields) so that the duplication of the register name isn't needed.
#61
1and0
Access is Denied
  • Total Posts : 12108
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: Does MPLAB X support programming in PIC assembler? 2021/01/15 07:38:34 (permalink)
+1 (1)
oliverb
The long bit names are not really the fault of the assembler though,

It is not the fault of the assembler; it is the fault of the persons who decided to use such long bit names. ;)
 
oliverb
surely you could use the pedantic definitions in MPASM just as easily.

Yeah, I was thinking yesterday the device specific .INC file from MPASM can be #included instead of <xc.inc>.
 
oliverb
Its more like a trend towards stamping out any ambiguity in definitions, at the expense of making everything 3x longer.

... and more typing, clutter code, less readable, and so on.
 
oliverb
I suppose as long as a PIC just had one status register, one timer, one usart etc the issue of bit definitions needing to "belong" to the specific register didn't arise. Having said that I've had to break my own habit of single-letter variable names due to the number of times you get name collisions in embedded environments

Lot of good that'll do when, for example, these
        btfss   STATUS, STATUS_C_POSN
        btfss   STATUS, PORTA_RA0_POSN
        btfss   STATUS, LATA_LATA0_POSN

will assemble to the SAME opcode. :)
 
#62
1and0
Access is Denied
  • Total Posts : 12108
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: Does MPLAB X support programming in PIC assembler? 2021/01/15 16:16:39 (permalink)
+3 (3)
1and0
Yeah, I was thinking yesterday the device specific .INC file from MPASM can be #included instead of <xc.inc>.

Using the device specific .inc file from MPASM with minor modification and change of all the hexadecimal numbers format, for example, from H'1234' to 1234h, and it builds successfully with PIC-AS.
 
#63
K8LH
Super Member
  • Total Posts : 1887
  • Reward points : 0
  • Joined: 2004/03/26 05:12:34
  • Location: Michigan, USA
  • Status: offline
Re: Does MPLAB X support programming in PIC assembler? 2021/01/17 00:28:59 (permalink)
+1 (1)
My problem, Gentlemen, is that I had to upgrade to the 64-bit MPLABX to be able to work with a more recent device (18F16Q40) and, with only 3-Gigabytes of RAM, my laptop coughs and chokes and it's taking hours to do something that should have only taken minutes.  And don't even try to run MCC (gads!).  I've resorted to editing the source files in Notepad++ and then switching over to MPLABX to compile... 
 
Does anyone know if there's a way to add the 18F16Q40 device to my 32-bit MPLABX 5.30 (pretty please)???
 
Stay safe.  Cheerful regards, Mike
#64
W4GNS.
Dazed n Confused
  • Total Posts : 47
  • Reward points : 0
  • Joined: 2009/11/16 18:23:19
  • Status: offline
Re: Does MPLAB X support programming in PIC assembler? 2021/01/17 07:35:19 (permalink)
0 (2)
K8LH
with only 3-Gigabytes of RAM, my laptop coughs and chokes and it's taking hours to do something that should have only taken minutes. 



New computer time?
#65
K8LH
Super Member
  • Total Posts : 1887
  • Reward points : 0
  • Joined: 2004/03/26 05:12:34
  • Location: Michigan, USA
  • Status: offline
Re: Does MPLAB X support programming in PIC assembler? 2021/01/17 22:28:38 (permalink)
+4 (4)
W4GNS.
K8LH
with only 3-Gigabytes of RAM, my laptop coughs and chokes and it's taking hours to do something that should have only taken minutes. 



New computer time?


What a kind and generous offer Gary.  Thank you.  Please send it to my address listed in the FCC database (qrz.com).  And if you'd be kind enough to include a Rigol or Siglent 200-MHz DSO, I'd be ever so grateful (grin)...
 
Vy 73, Mike, K8LH (Michigan, USA)
#66
Jim Nickerson
User 452
  • Total Posts : 6915
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: offline
Re: Does MPLAB X support programming in PIC assembler? 2021/01/18 07:30:15 (permalink)
+1 (3)
K8LH
W4GNS.
K8LH
with only 3-Gigabytes of RAM, my laptop coughs and chokes and it's taking hours to do something that should have only taken minutes. 



New computer time?


What a kind and generous offer Gary.  Thank you.  Please send it to my address listed in the FCC database (qrz.com).  And if you'd be kind enough to include a Rigol or Siglent 200-MHz DSO, I'd be ever so grateful (grin)...
 
Vy 73, Mike, K8LH (Michigan, USA)


Thank you for your response, it made me chuckle. Smile: Smile
#67
NorthGuy
Super Member
  • Total Posts : 6525
  • Reward points : 0
  • Joined: 2014/02/23 14:23:23
  • Location: Northern Canada
  • Status: offline
Re: Does MPLAB X support programming in PIC assembler? 2021/01/18 09:08:15 (permalink)
+3 (3)
K8LH
And if you'd be kind enough to include a Rigol or Siglent 200-MHz DSO, I'd be ever so grateful (grin)...

 
Rigol ... Ask for Keysight!
 
#68
1and0
Access is Denied
  • Total Posts : 12108
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: Does MPLAB X support programming in PIC assembler? 2021/01/18 12:53:52 (permalink)
+2 (2)

 ... Ask for Keysight!

It would be awesome if anyone could send me that as a late Christmas gift!!!
 
#69
1and0
Access is Denied
  • Total Posts : 12108
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: Does MPLAB X support programming in PIC assembler? 2021/01/18 12:56:59 (permalink)
+2 (2)
oliverb
Having said that I've had to break my own habit of single-letter variable names due to the number of times you get name collisions in embedded environments

I have never used single-letter variable names in MPASM code. The only single-letter predefined symbols used by MPASM that I'm aware of are:
 
  A - Access
  F - File
  W - Wreg

  C - Carry
  Z - Zero
  N - Negative
 
  R - Read
  S - Start
  P - stoP
  D - Data

So, I consider single-letter symbols are reserved for the assembler.  For C, it would be another topic. ;)
 
post edited by 1and0 - 2021/01/18 15:29:42
#70
dan1138
Super Member
  • Total Posts : 4246
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: Does MPLAB X support programming in PIC assembler? 2021/01/18 14:20:36 (permalink)
+10 (10)
K8LH
 
Please send it to my address listed in the FCC database (qrz.com).  And if you'd be kind enough to include a Rigol or Siglent 200-MHz DSO, I'd be ever so grateful (grin)...

I can send to you a BitScope model BS-100U.
 
This was made in 2007, is no longer available for purchase and IMHO this specific model is the worst kind of USB oscilloscope I have ever tried to use. I found the version 2.0 of the windows application a terrible experience. Perhaps the current version is better but I could not be bothered to find out.
 
If this post gets 10 or more up votes by 2021-Jan-31 I will figure out how to use the FCC database, look up the address of K8LH and send it to you.
 
<EDIT>
 
So we achieved our goal and Mike gets the BitScope.
 
I will confirm the address in a PM and post it as soon as possible.
post edited by dan1138 - 2021/01/22 16:56:04
#71
W4GNS.
Dazed n Confused
  • Total Posts : 47
  • Reward points : 0
  • Joined: 2009/11/16 18:23:19
  • Status: offline
Re: Does MPLAB X support programming in PIC assembler? 2021/01/18 14:24:59 (permalink)
+1 (1)
 
 
 
If you send it to Mike, I'll show you how to use qrz or the fcc database, even though Mike's back yard is full of buried mason jars full of money.  grin: grin
#72
mpgmike
Super Member
  • Total Posts : 533
  • Reward points : 0
  • Joined: 2014/01/23 17:27:06
  • Location: NJ
  • Status: offline
Re: Does MPLAB X support programming in PIC assembler? 2021/01/18 17:11:56 (permalink)
+1 (1)
About a year ago I sold an older analog scope.  I searched Craigslist to establish value.  I found several good (according to the seller's description) scopes for under $100, which is the price range I sold mine at.  You may luck out searching local ads.

I don't need the world to know my name, but I want to live a life so all my great-grandchildren proudly remember me.
#73
dan1138
Super Member
  • Total Posts : 4246
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: Does MPLAB X support programming in PIC assembler? 2021/01/19 18:50:18 (permalink)
0 (2)
W4GNS.
... even though Mike's back yard is full of buried mason jars full of money.  grin: grin

I looked on the satellite photos but could not spot where the mason jars are buried.
#74
Murton Pike Systems
Super Member
  • Total Posts : 229
  • Reward points : 0
  • Joined: 2020/09/10 02:13:01
  • Location: 0
  • Status: offline
Re: Does MPLAB X support programming in PIC assembler? 2021/01/20 17:20:53 (permalink)
+1 (1)
I baulked at MPLAB X for quite a while as it was quite a bit different from MPLAB 8.92
Its all I use now after getting into Harmony and converting all my Assembly language to C programs.
 
#75
atferrari
Super Member
  • Total Posts : 1464
  • Reward points : 0
  • Joined: 2004/07/08 13:09:24
  • Location: Buenos Aires - Argentina
  • Status: offline
Re: Does MPLAB X support programming in PIC assembler? 2021/02/13 18:16:47 (permalink)
0
1and0
oliverb
The long bit names are not really the fault of the assembler though,

It is not the fault of the assembler; it is the fault of the persons who decided to use such long bit names. ;)
 
oliverb
surely you could use the pedantic definitions in MPASM just as easily.

Yeah, I was thinking yesterday the device specific .INC file from MPASM can be #included instead of <xc.inc>.
 
oliverb
Its more like a trend towards stamping out any ambiguity in definitions, at the expense of making everything 3x longer.

... and more typing, clutter code, less readable, and so on.
 
oliverb
I suppose as long as a PIC just had one status register, one timer, one usart etc the issue of bit definitions needing to "belong" to the specific register didn't arise. Having said that I've had to break my own habit of single-letter variable names due to the number of times you get name collisions in embedded environments

Lot of good that'll do when, for example, these
        btfss   STATUS, STATUS_C_POSN
        btfss   STATUS, PORTA_RA0_POSN
        btfss   STATUS, LATA_LATA0_POSN

will assemble to the SAME opcode. :)
 





For the micro I am currently using, the pic-as .inc file contains different definitions that its equivalent in MPASM.
 
BTW, xc.inc allows different psect to be recognized by the Assembler.
 
 

Agustín Tomás

In theory, there is no difference between theory and practice. In practice, however, there is.

http://cablemodem.fibertel.com.ar/atferrari/
#76
1and0
Access is Denied
  • Total Posts : 12108
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: Does MPLAB X support programming in PIC assembler? 2021/02/13 19:37:15 (permalink)
+1 (1)
atferrari
For the micro I am currently using, the pic-as .inc file contains different definitions that its equivalent in MPASM.

PIC-AS code is not compatible with MPASM.
 
atferrari
BTW, xc.inc allows different psect to be recognized by the Assembler.

Like I've always said, many things regarding PIC-AS should be predefined so there are less manual works on the users.
#77
Page: < 1234 Showing page 4 of 4
Jump to:
© 2021 APG vNext Commercial Version 4.5