gnupic: gpasm syntax problem


Previous by date: 28 May 2002 01:24:44 -0000 gpasm syntax problem, Marko Hyv�rinen
Next by date: 28 May 2002 01:24:44 -0000 Not Bored with Breadboard, Scott Dattalo
Previous in thread: 28 May 2002 01:24:44 -0000 gpasm syntax problem, Marko Hyv�rinen
Next in thread:

Subject: Re: gpasm syntax problem
From: Craig Franklin ####@####.####
Date: 28 May 2002 01:24:44 -0000
Message-Id: <3CF2DB03.15B8BEDE@attbi.com>

Section 2.5.1.1 of the MPASM users manual states that "A label must
start in column 1."  Which is what gpasm supports.  However, like in
several other cases, Microchip has exended MPASM capabilities beyond
what is documented.  If you review the list file you will probably find
a warning.  Something like "Found label after column 1."  

Adding this feature is on my list, but it has a very low priority.
Because labels can occur on most types of lines, it has the potential to
really screw things up in the parser.  It will be at least several
monthes before I will get to it.

The only good work around I can think of is to place the code in a
seperate file.  Then change your pascal to 

asm
{
  #include "mycode.asm"
}
end;

?? it might work ??

"Marko Hyvärinen" wrote:
> 
> HI !
> 
> P2C-plus 1.21e Pascal-compiler.  Copyright(c) 1999 by Pavel Baranov.
> ####@####.####
> 
> gpasm-0.9.13 alpha
> 
> I have problem with gpasm. This goes ok with dosversion of MPASM.
> I do my programming with P2C ( Free pascal compiler) and compile result with gpasm nowadays. I use assembler inside .pas code, and example is this:
> 
> procedure make_pwm;
> begin;
> asm
> {
> _alku                         <-------- ATTENTION !!!!!!!!!!
> movfw _viive1
> movwf param00_delay_ms
> BSF PORTA, 0
> call _delay_ms
> movfw _viive1
> movwf param00_delay_ms
> BCF PORTA, 0
> call _delay_ms
> goto _alku
> }
> end;
> 
> blabla......
> 
> Result is this:
> 
> _make_pwm__code
> _make_pwm
>         _alku                        <-------- ATTENTION !!!!!!!!!!
>         movfw _viive1
>         movwf param00_delay_ms
>         BSF PORTA, 0
>         call _delay_ms
>         movfw _viive1
>         movwf param00_delay_ms
>         BCF PORTA, 0
>         call _delay_ms
>         goto _alku
> 
> blablaa....
> 
> BUT this won't work, gpasm says:
> 
> bash-2.05# gpasm -p 16c84 usgen.asm
> usgen.asm:55:Error [157] Unknown opcode "_alku"
> usgen.asm:64:Error [113] Symbol not previously defined (_alku).
> bash-2.05# gpasm -p 16c84 usgen.asm
> 
> Testing testing.... and result is that label named _alku must be in beginning of line, then it compiles ok !!
> 
> Question:
> Do there exist solution or newer version or how i can over this ?
> P2C is quite good and i like do "pascal", so this is quite annoing when my code works with MPASM, not with gpasm.
> IT IS QUITE SHITTY TO FIX ALL BY HAND !
> 
> 73 Marko
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####

Previous by date: 28 May 2002 01:24:44 -0000 gpasm syntax problem, Marko Hyv�rinen
Next by date: 28 May 2002 01:24:44 -0000 Not Bored with Breadboard, Scott Dattalo
Previous in thread: 28 May 2002 01:24:44 -0000 gpasm syntax problem, Marko Hyv�rinen
Next in thread:


Powered by ezmlm-browse 0.20.