News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_SkulleateR

Write BIN file to DSK

Started by SkulleateR, 12:13, 27 May 21

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SkulleateR

Ok, I'm doing some testing here in ASM but I cannot write a BIN file to DSK it seems ....


The code is very simple :



org &4000
ld a,99
ld (&4FFF),a
ret



So, if I assemble it, everythings fine, I can also call it from basic and execute it, but I cannot write the bin file on the DSK ... what I tried :


1.) put a WRITE"B:TEST.BIN" in the asm code
2.) assemble it and in basic do a SAVE"B:TEST.BIN",B,&4000


Now if I try to load it from disk it ALWAYS gives me "Memory Full" Error ??? Help ...


arnolde

#1
Yes, you have to tell Basic first to make space for your binary by typing
MEMORY &3FFF
(3FFF being destination of bin - 1)

arnolde

#2

But I just realized that your problem occurs when saving the bin. And that's because you have to specify the size of your program. In your case, I guess it's 6 bytes, so:
SAVE"B:TEST.BIN",B,&4000,6

(The "memory" bit is what you will need when loading...)

SkulleateR

#3
Quote from: arnolde on 12:16, 27 May 21
Yes, you have to tell Basic first to make space for your binary by typing
MEMORY &3FFF
(3FFF being destination of bin - 1)


Thx, got nearly no sleep for 3 days now, guess my brain already begins to melt  :picard: :picard: :picard:


QuoteBut I just realized that your problem occurs when saving the bin. And that's because you have to specify the size of your program. In your case, I guess it's 6 bytes, so:SAVE"B:TEST.BIN",B,&4000,6(The "memory" bit is what you will need when loading...)


Yes, did that, just forgot to post it above .... but anyway -> SOLVED  :laugh:

Powered by SMFPacks Menu Editor Mod