News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
T

ASM 2 BIN

Started by tony, 18:54, 18 July 09

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tony

Hi,
I'm using WinApe and I'm using the built in assembler.  My code assembles and runs okay.
Can some one advice me on how I now turn my .asm to a .bin file?  I cannot seem to find a reference on how to do this (even using Maxam, it is not clear)
Am I missing a newbie trick here?
thanks
Tony

Ynot.zer0

(typical, as soon as I post I find a reference)  :-[
All I have to do is make the first line of the ASM to read:
write "output.bin"
is that correct?

Grim

That's correct but the binary file will be saved on your PC hard drive. You will have to copy it into a DSK image in order to use it within WinAPE (But you can do that with WinAPE too, just select a DSK for Drive A, press SHIFT+CTRL+F1 to open the Disc Editor window, check the box to Add/Remove AMSDOS headers then drag'n'drop your file in the window, and that's it, phew... :).

You can also assemble directly into the emulated CPC memory and save your binary from BASIC with something like this (assuming you're not compiling your program into the reserved Firmware areas):
SAVE"FILENAME",b,<start address of your program>,<lenght of your program in byte>[,<execution address>]
The <execution address> allow you to execute your program with a RUN"FILENAME, otherwise you will have to LOAD it from BASIC and CALL it manually.

Axelay

If you want it on a CPC disk image rather than the PC hard drive you can also use the following as the first three lines in your asm file:

org &8000
run &8000
write direct "a:output.bin"

which will give you a file called "output.bin" on the disk image in drive A with load & execution addresses of &8000

Powered by SMFPacks Menu Editor Mod