[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
gpasm problem with EQU results in parse error
From: Michael Dupras ####@####.#### Date: 3 Apr 2003 17:34:30 -0000 Message-Id: <3E8C6DDA.5080406@superaje.com> I recently built gputils 0.11.0, and am having problems with EQU, as seen below. environment is a Linux (Mandrake 9.0) Any help, questions or suggestions would be appreciated. Thank you Michael ;***** CONSTANT DECLARATION ***** CONSTANT TEMP_BASE=0Ch ; Base address of user file registers ;***** REGISTER DECLARATION ***** VARIABLE TEMP1 TEMP1 EQU (TEMP_BASE + 0) TEMP2 equ TEMP_BASE + 1 TEMP3 equ TEMP_BASE + '2' VARIABLE TEMP4 =TEMP_BASE + '3' VARIABLE FLAGsreg = TEMP_BASE + '4'd VARIABLE TXD = TEMP_BASE + d'5' VARIABLE RXD = TEMP_BASE + 6 END listing follows: gpasm-0.11.0 alpha equ_test.asm4-3-2003 12:19:31 PAGE 1 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00001 ;*************************************************************************** 00002 00003 PROCESSOR 16C84 00004 #include "p16c84.inc" 00001 LIST 00002 ; P16C84.INC Standard Header File, Version 1.00 Microchip Technology, Inc. 00134 LIST 00005 00006 ; embed Configuration Data within .asm File. 002007 3FF9 00007 __CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _XT_OSC 00008 00009 ;***** MEMORY STRUCTURE ***** 00010 00011 ;ORG 0x00 processor reset vector, declared below 00012 ;ORG 0x04 interrupt service routine, declared below 00013 00014 ;***** CONSTANT DECLARATION ***** 00015 00016 CONSTANT TEMP_BASE=0Ch ; Base address of user file registers 00017 00018 ;***** REGISTER DECLARATION ***** 00019 VARIABLE TEMP1 Error [103] : parse error 00020 TEMP1 EQU (TEMP_BASE + 0) Error [103] : parse error 00021 TEMP2 equ TEMP_BASE + 1 Error [103] : parse error 00022 TEMP3 equ TEMP_BASE + '2' 00023 VARIABLE TEMP4 =TEMP_BASE + '3' Error [103] : parse error 00024 VARIABLE FLAGsreg = TEMP_BASE + '4'd 00025 VARIABLE TXD = TEMP_BASE + d'5' 00026 VARIABLE RXD = TEMP_BASE + 6 00027 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: gpasm problem with EQU results in parse error
From: Craig Franklin ####@####.#### Date: 4 Apr 2003 02:04:40 -0000 Message-Id: <3E8CE563.9DD87D99@attbi.com> Place the label for the EQU in column 1 and it will assemble without errors. There is an open bug report in Sourceforge covering it: https://sourceforge.net/tracker/index.php?func=detail&aid=564641&group_id=41924&atid=431665 gpasm is operating according to the mpasm user manual. The argument is a label and all labels must start on column 1. Some people like to indent their labels for readability. So mpasm supports this undocumented feature. It generates a warning and continues. Eventually this feature will be added to gpasm, but for me it has a very low priority. It will require a hack in the parser that won't be very pretty. I also have a personal bias. IMHO, all labels should go in column 1. For these reasons, I havn't been too excited about making the change. For this specific application, you might want to use cblock or res. Michael Dupras wrote: > > I recently built gputils 0.11.0, and am having problems with EQU, as > seen below. > environment is a Linux (Mandrake 9.0) > > Any help, questions or suggestions would be appreciated. > > Thank you > Michael > > ;***** CONSTANT DECLARATION ***** > CONSTANT TEMP_BASE=0Ch ; Base address of user file registers > > ;***** REGISTER DECLARATION ***** > VARIABLE TEMP1 > TEMP1 EQU (TEMP_BASE + 0) > TEMP2 equ TEMP_BASE + 1 > TEMP3 equ TEMP_BASE + '2' > VARIABLE TEMP4 =TEMP_BASE + '3' > VARIABLE FLAGsreg = TEMP_BASE + '4'd > VARIABLE TXD = TEMP_BASE + d'5' > VARIABLE RXD = TEMP_BASE + 6 > > END > > listing follows: > > gpasm-0.11.0 alpha equ_test.asm4-3-2003 12:19:31 > PAGE 1 > > LOC OBJECT CODE LINE SOURCE TEXT > VALUE > > 00001 > ;*************************************************************************** > 00002 > 00003 PROCESSOR 16C84 > 00004 #include "p16c84.inc" > 00001 LIST > 00002 ; P16C84.INC Standard Header File, Version 1.00 > Microchip Technology, Inc. > 00134 LIST > 00005 > 00006 ; embed Configuration Data within .asm File. > 002007 3FF9 00007 __CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & > _XT_OSC > 00008 > 00009 ;***** MEMORY STRUCTURE ***** > 00010 > 00011 ;ORG 0x00 processor reset vector, > declared below > 00012 ;ORG 0x04 interrupt service routine, > declared below > 00013 > 00014 ;***** CONSTANT DECLARATION ***** > 00015 > 00016 CONSTANT TEMP_BASE=0Ch ; Base address of > user file registers > 00017 > 00018 ;***** REGISTER DECLARATION ***** > 00019 VARIABLE TEMP1 > Error [103] : parse error > 00020 TEMP1 EQU (TEMP_BASE + 0) > Error [103] : parse error > 00021 TEMP2 equ TEMP_BASE + 1 > Error [103] : parse error > 00022 TEMP3 equ TEMP_BASE + '2' > 00023 VARIABLE TEMP4 =TEMP_BASE + '3' > Error [103] : parse error > 00024 VARIABLE FLAGsreg = TEMP_BASE + '4'd > 00025 VARIABLE TXD = TEMP_BASE + d'5' > 00026 VARIABLE RXD = TEMP_BASE + 6 > 00027 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: ####@####.#### > For additional commands, e-mail: ####@####.#### | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |