Stumped (entry level ASM, gah)

Página 3/6
1 | 2 | | 4 | 5 | 6

Por Driehoogvoor

Resident (52)

Imagen del Driehoogvoor

13-08-2014, 13:59

That's my code, Grauw. Wink Thanks for the feedback, though! I've fixed the mistakes. The two Z80 instructions that were wrong were simple mistakes, the hidden commands were some text artifacts. On my MSX, I split up the code in three files—the main code, the VDP instructions and the data. I saved them as ASCII files in Compass, read those from disk on my PC using Disk Manager, moved them to my Mac via Dropbox, edited them in Coda en uploaded them to my website. I don't know where exactly it went wrong, but those were probably carriage return characters or something like that. Anyway, they're gone now. Smile

Por Grauw

Ascended (10564)

Imagen del Grauw

13-08-2014, 14:09

Yeah Compass does indeed add those funny invisible “SUB” characters at the end when it saves to ASCII files!

Por Driehoogvoor

Resident (52)

Imagen del Driehoogvoor

13-08-2014, 14:08

Good to know, thanks. I'll keep that in mind next time I want to put some code online.

Por Grauw

Ascended (10564)

Imagen del Grauw

13-08-2014, 14:09

Did this help you out, or are you still having trouble?

Por Driehoogvoor

Resident (52)

Imagen del Driehoogvoor

13-08-2014, 14:15

With the different assemblers, you mean? That was MSX_Noob, not me. This topic was originally about me getting stuck on something really basic (trying to read a space bar press) while trying to code that parallax star field. That was solved (kind of) by making sure interrupts were set before reading the keyboard matrix. It seems that Compass disables interrupts when it starts running a program.

I do have another assembly question, but that's in another topic. About displaying sprites in screen 5.

Por MSX_Noob

Resident (51)

Imagen del MSX_Noob

13-08-2014, 14:30

Thanks again Grauw! you're right, and in PS-Pad (gosh I love that app) it showed as a small arrow so I couldn't miss it.

Also changed the CP and SUB instructions ... almost there, that is...
it compiled without error, but the resulting .bin file is rejected by MSX due to the same "bad file mode" with bload. Sad
The file size is 354 bytes... correct?

Am I missing an option in the command line? (not much documentation found online)

What I entered: java -jar glass-0.4.jar stars.txt stars.bin

Por Grauw

Ascended (10564)

Imagen del Grauw

13-08-2014, 14:35

@Driehoogvoor I saw your other question but nothing springs to mind, sorry. I haven’t used sprites often.

Por Grauw

Ascended (10564)

Imagen del Grauw

13-08-2014, 14:42

MSX_Noob: You need to add a BIN header to be able to BLOAD a file. Also, the program starts at address 4000H. This is not possible if you want to load it from Basic with BLOAD, that’s where the Basic ROM is located. Change the start address to e.g. 9000H.

    DB #FE
    DW START, THEEND, MAIN

    ORG #9000

START:

               ; ---------------- M A I N ----------------

MAIN:

    ;
    ; ... all the remaining source code here
    ;

THEEND:

Por MSX_Noob

Resident (51)

Imagen del MSX_Noob

13-08-2014, 15:01

Thanks Grauw! ok, it loads but I just see a number of stars lined down, on the left. no movement.
when I click the space bar it goes black.

but no need to answer this one, unless you can't control the urge Wink

I'll check it out and try some simple coding myself too...

I wish I could buy you all a good Belgian tripple and chocolates but I'll do the second (?) best thing and donate to the dutch bank account. (or try the Paypal button at home, it doesn't work here)

Por AxelF

Champion (395)

Imagen del AxelF

13-08-2014, 15:13

Nice starfiled Driehoogvoor...

The stars work okay here,
but my screen stays black here allso after keypressed ... typing screen 0 clears that.
Maybe going back to screen 0 with call #78 is a better alternative.

Compiled it with SJASM on PC...

Página 3/6
1 | 2 | | 4 | 5 | 6