Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RSEG PRG
- RSEG SCL_HDR:DATA
- PUBLIC SCL_SIG
- DIR_ENTRY_SIZE equ DIR_ENTRY_END-DIR_ENTRY_BEGIN
- DIR_SIZE equ DIR_END-DIR_BEGIN
- PRG_NSEC equ (SIZEOF PRG + 255) >> 8
- #define if_then_else(a, b, c) ((a)*(b)+!(a)*(c))
- SCL_SIG: defm 'SINCLAIR'
- SCL_NBLK: defb DIR_SIZE/DIR_ENTRY_SIZE
- DIR_BEGIN:
- DIR_ENTRY_BEGIN:
- SCL_FN: defm 'prg B'
- SCL_START: defw LDR_SIZE-4
- SCL_LENGTH: defw LDR_SIZE-4
- SCL_NSEC: defb if_then_else(PRG_NSEC > 1*255, 255, PRG_NSEC & 0xFF)
- DIR_ENTRY_END:
- DIR_CODE_ENTRY macro
- local c2
- defm 'prg '
- defb '0'+\1
- defw 0
- defw 0
- c2 equ if_then_else(PRG_NSEC > (\1)*255, (PRG_NSEC - (\1)*255) & 0xFF, 0)
- defb if_then_else(PRG_NSEC > (\1+1)*255, 255, c2)
- endm
- li defl 1
- rept 9
- DIR_CODE_ENTRY li
- li defl li + 1
- endr
- DIR_END:
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement