CodeWalrus

Development => Calculators => Calculator News, Coding, Help & Talk => Topic started by: 123outerme on February 23, 2017, 11:42:53 PM

Title: z80 Brass Assembly issues
Post by: 123outerme on February 23, 2017, 11:42:53 PM
For some reason, I set up my 83+ Assembly environment (following and checking it against every guide I looked for, including correct include files, etc. And I'm no stranger to ASM, I did a little bit of CSE ASM), yet I can't load any program I build into WabbitEmu. I've tried looking through the list file produced, I've tried removing the .db t2ByteTok, tAsmCmp so I can see if it just outputs a readable file (that would only contain numbers, of course :P), but I can't read that either.


.nolist
#include "ti83plus.inc"
#define ProgStart $9D95
.list
.org ProgStart - 2
.db t2ByteTok, tAsmCmp
;b_call(_RunIndicOff)
b_call(_ClrLCDFull)
ld     HL, numVar
b_call(_DispHL)
KeyLoop:
    b_call(_GetCSC)
    cp skUp       ; If the up arrow key was pressed.
    JR Z, Increase
    cp skDown     ; If the down arrow key was pressed.
    JR Z, Decrease
    cp skClear    ; If the CLEAR key was pressed.
    JR Z, Finish
    JR KeyLoop    ; If any other key was pressed, or none, redo _GetCSC.
Increase:
ld A, H
cp 255
JR Z, KeyLoop
inc HL
ld (numVar), HL
JR PrintHL
Decrease:
ld A, H
cp 0
JR Z, KeyLoop
dec HL
ld (numVar), HL
PrintHL:
b_call(_ClrLCDFull)
b_call(_DispHL)
JR KeyLoop
Finish:
;b_call(_RunIndicOn)
b_call(_ClrLCDFull)
    ret
numVar:
.db 0
.end


Edit: If it helps, the error thrown by WabbitEmu when trying to load says "Invalid file argument".
Title: Re: z80 Brass Assembly issues
Post by: p2 on February 24, 2017, 08:14:37 AM
@Sorunome should take a look at this :)
Title: Re: z80 Brass Assembly issues
Post by: tr1p1ea on February 24, 2017, 09:03:03 AM
With BRASS have you included the '.binarymode ti8x' directive?

http://www.benryves.com/bin/brass/
Title: Re: z80 Brass Assembly issues
Post by: 123outerme on February 24, 2017, 04:21:07 PM
Quote from: tr1p1ea on February 24, 2017, 09:03:03 AM
With BRASS have you included the '.binarymode ti8x' directive?

http://www.benryves.com/bin/brass/
Yes, that was the problem! I got confused when looking at my CSE code and seeing that, since I thought it was specific to CSE asm using Doors. I should probably just use Spasm instead.