Files
Andrew Plotkin b642da811e Initial commit.
2023-11-16 18:19:54 -05:00

115 lines
1.8 KiB
NASM

TITLE "Apple ][ YZIP (c)Infocom","MACROS"
;
; MACROS for Apple ][ Yzip
;
DLINE: MACRO STRING,SLEN
ldx \#LOW #STRING# ; get part of STRING
lda \#HIGH #STRING# ; get other part of string
IF NUL #SLEN# ; is there a length defined?
ldy \##STRING#L ; get length of string
ELSE
ldy #SLEN# ; then just fetch it
ENDIF
jsr DISPLAY_LINE ; print the string
ENDM
;
; ProDOS macros
;
PRODOS: MACRO CODE, PADDR
jsr $BF00 ; ProDOS handler
DB #CODE# ; ProDOS function code
DW #PADDR# ; Function Parameter Block address
ENDM
QUIT: MACRO PBLOCK
PRODOS $65, #PBLOCK#
ENDM
READ_BLOCK: MACRO PBLOCK
PRODOS $80, #PBLOCK#
ENDM
WRITE_BLOCK: MACRO PBLOCK
PRODOS $81, #PBLOCK#
ENDM
GET_TIME: MACRO PBLOCK
PRODOS $82, #PBLOCK#
ENDM
CREATE: MACRO PBLOCK
PRODOS $C0, #PBLOCK#
ENDM
DESTROY: MACRO PBLOCK
PRODOS $C1, #PBLOCK#
ENDM
RENAME: MACRO PBLOCK
PRODOS $C2, #PBLOCK#
ENDM
SET_FILE_INFO: MACRO PBLOCK
PRODOS $C3, #PBLOCK#
ENDM
GET_FILE_INFO: MACRO PBLOCK
PRODOS $C4, #PBLOCK#
ENDM
ONLINE: MACRO PBLOCK
PRODOS $C5, #PBLOCK#
ENDM
SET_PREFIX: MACRO PBLOCK
PRODOS $C6, #PBLOCK#
ENDM
GET_PREFIX: MACRO PBLOCK
PRODOS $C7, #PBLOCK#
ENDM
OPEN: MACRO PBLOCK
PRODOS $C8, #PBLOCK#
ENDM
NEWLINE: MACRO PBLOCK
PRODOS $C9, #PBLOCK#
ENDM
READ: MACRO PBLOCK
PRODOS $CA, #PBLOCK#
ENDM
WRITE: MACRO PBLOCK
PRODOS $CB, #PBLOCK#
ENDM
CLOSE: MACRO PBLOCK
PRODOS $CC, #PBLOCK#
ENDM
SET_MARK: MACRO PBLOCK
PRODOS $CE, #PBLOCK#
ENDM
GET_MARK: MACRO PBLOCK
PRODOS $CF, #PBLOCK#
ENDM
SET_EOF: MACRO PBLOCK
PRODOS $D0, #PBLOCK#
ENDM
SET_BUF: MACRO PBLOCK
PRODOS $D1, #PBLOCK#
ENDM
GET_BUF: MACRO PBLOCK
PRODOS $D2, #PBLOCK#
ENDM
END