The shoutbox is currently out of service. Join us on Discord instead.
You can help CodeWalrus stay online by donating here.

z80 Brass Assembly issues

Started by 123outerme, February 23, 2017, 11:42:53 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


February 23, 2017, 11:42:53 pm Last Edit: February 24, 2017, 02:48:02 am by 123outerme
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.

#include ""
#define ProgStart $9D95
.org ProgStart - 2
.db t2ByteTok, tAsmCmp
ld     HL, numVar
    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.
ld A, H
cp 255
JR Z, KeyLoop
inc HL
ld (numVar), HL
JR PrintHL
ld A, H
cp 0
JR Z, KeyLoop
dec HL
ld (numVar), HL
JR KeyLoop
.db 0

Edit: If it helps, the error thrown by WabbitEmu when trying to load says "Invalid file argument".


Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)


With BRASS have you included the '.binarymode ti8x' directive?


Quote from: tr1p1ea on February 24, 2017, 09:03:03 am
With BRASS have you included the '.binarymode ti8x' directive?

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.

Powered by EzPortal