Problems with assembler pasmo 0.6.0.20061009.0

Home Forums Z80 Playground Early-Adopters Problems with assembler pasmo 0.6.0.20061009.0

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #923
    Kotec53
    Participant

    Hello,
    I wasted a lot of time trying to find out why a program as simple as “to_upcase” did not work on my Z80 board.
    As I’m old school, I like to quickly go through the listing generated by the assembler to see the bytes directly.

    And there ! amazement ! the code is bad.
    Look: here is a very simple test, assembled with pasmo then with tasm.
    environment : windows 10 pasmo V0.6
    batch pasmo: pasmo –hex –output %1.hex –verbose –listing %1.lst %1.asm
    batch tasm: tasm -80 -a5 -g0 -l1 -s -o10 %1.asm

    The source code passmo_test.asm
          org $0
          ld a,$12
          cp $13
          cp 'A'
          cp 'a'
          cp $45 + 12h + 7
          cp 1 + 'e'
          cp 'e' + 1
          end

    Here is the listing generated with pasmo

    	pasmo 0.6.0.20061009.0 PAGE 1
    		              ORG $0
    		              
      0000 3E 12 LD A,$12
      0002 FE 13 CP $13
      0004 FE 41 CP 'A'
      0006 FE 61 CP 'a'
      0008 FE 5E CP $45 + 12h + 7
      000A FE 66 CP 1 + 'e'
      000C FE 01 CP 'e' + 1
             
    		              END

    the same code with TASM

    0001 0000 .org $0
    0002 0000                   
    0003 0000 3E 12 ld a,$12
    0004 0002 FE 13 cp $13
    0005 0004 FE 41 cp 'A'
    0006 0006 FE 61 cp 'a'
    0007 0008 FE 5E cp $45 + 12h + 7
    0008 000A FE 66 cp 1 + 'e'
    0009 000C FE 66 cp 'e' + 1
    0010 000E                   
    0011 000E .end
    0012 000E                   
    0013 000E                   
    
    tasm: Number of errors = 0

    the address line $000C is significant, and the code CP is different !.

    I had to check all the CPs in the cpm.asm code to solve the parsing problems and the upper/lower case conversions
    Do you have another version of pasmo?
    Or maybe it is better to switch to TASM?
    Bye

    Translated with http://www.DeepL.com/Translator (free version)

    • This topic was modified 1 year, 1 month ago by Kotec53. Reason: little corrections
    #925
    john
    Keymaster

    In Pasmo you cannot have spaces in the code between maths symbols. It is a very good assembler, but it has caught me out with this stupid problem before. You need to write:
    cp ‘e’+1
    Note there are NO SPACES AROUND THE PLUS SIGN!!!!
    You and I have both lost a lot of hair from this problem. I use Pasmo all the time and like it a lot, but it does have that one annoying quirk. I use Pasmo v. 0.5.4.beta2 (C) 2004-2005 Julian Albo.
    Basically I think it stops reading the input when it sees a space?!?!

    #935
    Kotec53
    Participant

    Just for info.
    With or without space , pasmo have the same bug .
    Be very catefull with your asm code !

      0064                  XXX0	equ  'd'
      0009                  XXX1	equ   1+2+6
      0042                  XXX2	equ   1+'A'
      0001                  XXX3	equ   'A'+1
      0001                  XXX4	equ   'A' + 1
      0042                  XXX5	equ   1 + 'A'
      0042                  XXX6	equ   'A' + 'B'
      0042                  XXX7	equ   'A'+'B'
    		        		
      0016   3E 64          	LD A, 'd'
      0018   3E 09          	LD A,  1+2+6
      001A   3E 42          	LD A,  1+'A'
      001C   3E 01          	LD A,  'A'+1
      001E   3E 01          	LD A,  'A' + 1
      0020   3E 42          	LD A,  1 + 'A'
      0022   3E 42          	LD A,  'A' + 'B'
      0024   3E 42          	LD A,  'A'+'B'
    		        	
      0026   FE 64          	CP 'd'
      0028   FE 09          	CP 1+2+6
      002A   FE 42          	CP 1+'A'
      002C   FE 01          	CP 'A'+1
      002E   FE 01          	CP 'A' + 1
      0030   FE 42          	CP 1 + 'A'
      0032   FE 42          	CP 'A' + 'B'
      0034   FE 42          	CP 'A'+'B'
    #936
    Phil_G
    Moderator

    Hi Kotec, which version of Pasmo are you using? I just tried your test file and mine comes out correctly with Pasmo 0.5.3

    C:\public\phil\pasmo\pasmo-0.5.3>pasmo -d kotec.asm kotec.obj kotec.sym
                    ORG 0000
    XXX0            EQU 0064
    XXX1            EQU 0009
    XXX2            EQU 0042
    XXX3            EQU 0042
    XXX4            EQU 0042
    XXX5            EQU 0042
    XXX6            EQU 0083
    XXX7            EQU 0083
    0000:3E64       LD A, 64
    0002:3E09       LD A, 09
    0004:3E42       LD A, 42
    0006:3E42       LD A, 42
    0008:3E42       LD A, 42
    000A:3E42       LD A, 42
    000C:3E83       LD A, 83
    000E:3E83       LD A, 83
    0010:FE64       CP 64
    0012:FE09       CP 09
    0014:FE42       CP 42
    0016:FE42       CP 42
    0018:FE42       CP 42
    001A:FE42       CP 42
    001C:FE83       CP 83
    001E:FE83       CP 83
    0020:           END
    Emiting raw binary from 0000 to 001F
    
    C:\public\phil\pasmo\pasmo-0.5.3>
    

    By the way, how did you get your listing file? (.lst or .prn)
    as one of my dislikes of Pasmo is that I haven’t been able to produce a .lst or .prn listing file, which you have managed!

    Cheers
    Phil

    Edit: could this be a non-UK keyboard or character-set thing?

    #937
    Kotec53
    Participant

    I use version 0.6 of pasmo The only avantage is the listing with option
    pasmo foo.asm –listing foo.lst

    But the bug in generation of binary is a BIG problem !
    I work for use TASM . It have all options for me, but it a big work to
    tranforms the source code with TASM …..
    I want a listing , but I dont want bugs ……
    perherps make a pass with pasmo 0.5 the the binary and an other pass with pasmo 0.6 only for the listing and dont care of little bug …

    #938
    Phil_G
    Moderator

    The speccy site does say that 0.6 is unfinished… 🙂

    • This reply was modified 1 year, 1 month ago by Phil_G.
    #942
    john
    Keymaster

    I’m a bit puzzled by this. I have used Pasmo for all of my assembler work and not hit a problem. But then I am using 0.5.4 so maybe that is the reason.

    #943
    Kotec53
    Participant

    Hello,
    I had an email exchange with the pasmo developer.
    He confirmed me that the 0.6 version is far from being finished and that some coding bugs are present.
    He plans to fix them, but not immediately, so the only usable version is 0.5.

    I think this project is very old for him and is not in his priorities anymore.
    This is what I think ends this discussion on pasmo. Personally, I will stay on the 0.5 version and so much the worse for the lack of listing.

    Bye

    Translated with http://www.DeepL.com/Translator (free version)

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.