
![]() |
||
| Updates | Knowledge base | Manuals | Resellers | Warranties | Feedback | ||
Knowledge Base[ Back ] [ Index ] [ Categories ] [ Next ] Q10008. How to make Sprinter's EXE program?SummaryThis article contain simple example of Sprinter's EXE program.More informationYou can use any assemblers, which have Z80 support. You have to add Sprinter's EXE-header only.
ORG 8100h-512
;EXE-file header:
dw 5845h ; EXE Signature
db 45h ; Reserved (EXE type)
db 00h ; Version of EXE file
dd 00000200h ; Code offset
dw 0000h ; Primary loader size or 0 (no primary loader)
dd 00000000h ; Reserved
dw 0000h ; Reserved
dw START ; Loading address
dw START ; Starting address (register PC)
dw 0BFFFh ; Stack address (register SP)
ds 490 ; Reserved
;code of program
START
;your program here
;return from your program
LD BC,0041h ;exit with 0 error code
RST 10h ;system call
RET
Also, we recommend to you use as STACK address value between 8000h-0BFFFh. It will care you to avoid mistakes with STACK. The DSS and BIOS functions can opened another memory pages in third memory window 0C000h-0FFFFh.
30 May 2002. |