Find file
Fetching contributors…
Cannot retrieve contributors at this time
46 lines (32 sloc) 1.28 KB
DCPUStation's assembler has a few extra commands
.def : Defines a litteral constant
.def VIDEO_MEM 0x8000
SET A, [VIDEO_MEM+B] is then equivalent to SET A, [0x8000+B]
.include : Includes another source file.. Warning.. no cycling-include test yet.. ;)
.out : Defines the final program's filename (must be 6.3 format)
Example :
.Assert_Address : Triggers an error when assembling if the current address we're assembling doesn't match the parameter
Useful when you rely on some code/data to be located at a specific address
Example :
.assert_address 21
.org / .end_org : Adds some litteral constant value to the address of symbols that are resolved in this region
this is mostly useful in Loader code, when you need to move some code at another location...
.no_relocation_table : Assembler won't output any relocation table for that program...
this should only be used for OS code, or code that you know will start at 0
.incbin "file" : Includes the given file as data
.strip_start / .strip_end
will strip the code from executable when not actually used. Useful when including big libraries
(work in progress, directives are ignored so far)