At 02:47 PM 5/13/99 -0700, you wrote: > Jerry, I have another suggestion for your documentation update. It would >help to add a short section on converting Microchip syntax to CVASM. The >obvious difference is the radix syntax. The Microchip conversion list >already covers fr and fr,W as well as the special instructions such as SKPC. >You could put in a short note about macros and the need to `unroll' them. >One problem that shows up a lot is operations using the STATUS register as >in the following example: > > Problem: Fix: > BTFSS STATUS,C -> BTFSS C or BTFSS STATUS,0 > BTFSS STATUS,DC -> BTFSS DC or BTFSS STATUS,1 > BTFSS STATUS,Z -> BTFSS Z or BTFSS STATUS,2 > > While CVASM will pass STATUS,C the other two will generate a Bit range >error. The fact that it passes C is a minor `quirk'. C, DC, and Z are >defined as Bit definitions (STATUS.0/1/2) as opposed to literals. What >would really be nice is to have the assembler recognize and convert the >STATUS,C/DC/Z syntax. > > The above should cover the majority of problems. You might want to just >add a few paragraphs below the syntax conversion lists. This would help >folks that have had reservations about using CVASM with all the native >syntax examples. > > - Tom > Good point. Microchip uses Literals (0-7) to define the bit _NUMBER_ within a register for all pre-defined bits. This makes sense because they do not have atrue BIT variable type. Thier syntax uses 'reg,bit_num'. CVASM uses actual bit variables with fully encode the actual bit address. The STATUS register bits are often used as you describe and therefor occur more often in source files, but this syntactical difference will show up with most bit operations. We have been kicking around the idea of a MPASM-2-CVASM conversion program that would expand macros, resolve conditionals and convert radix, bit notations and any other syntax. It doesn't appear to be too difficult; just too many good ideas.....not enough time. Anybody up to the challenge? Jerry Merrill jerrym@tech-tools.com http://www.tech-tools.com FAX: (972) 494-5814 VOICE:(972) 272-9392 TechTools PO Box 462101 Garland, TX 75046-2101