Compiling with:
Code: Select all
zcc +z180 --opt-code-speed -vn -lm -clib=new
Code: Select all
#pragma output CRT_MODEL = 0 //; RAM model
#pragma output CRT_ORG_CODE = 0x2000 //; CODE entry point - allow space for library
#pragma output CRT_ORG_DATA = 0 //; DATA appends to CODE
#pragma output CRT_ORG_BSS = 0 //; BSS appends to DATA
#pragma output CRT_ENABLE_EIDI = 0x01 //; Disable interrupts on entrance
#pragma output REGISTER_SP = -1 //; Leave SP unchanged
#pragma output CRT_ON_EXIT = 0x10002 //; return to caller on exit
#pragma output CRT_ENABLE_CLOSE = 0 //; no file handling on close
#pragma output CLIB_MALLOC_HEAP_SIZE = 0 //; no malloc heap
#pragma output CLIB_STDIO_HEAP_SIZE = 0 //; no stdio heap
#pragma output CLIB_FOPEN_MAX = -1 //; no FILE* list
#pragma output CLIB_OPEN_MAX = -1 //; no fd table
#PRAGMA OUTPUT CRT_ENABLE_NMI = 0
Code: Select all
di
ld ($D52B),sp
ld hl,$C54E
ld bc,$0FDD
ld e,$00
call $22C6
ld a,$00
ld i,a
ld a,$00
out0 ($33),a
im 1
call $22D7
push hl
pop hl
ld sp,($D52B)
ret