.TITLE ZPIC .IDENT /V1.0/ ; ++ ; This is the Z-machine handler for picture opcodes. ; (c) 2005 by Johnny Billquist ; ; History: ; ; V1.0 05-02-23 16:30 BQT Initial coding started. ; -- .INCLUDE /ZMAC/ .PSECT DATA,D,RW ; .PSECT CODE,I,RO ; ; EXT:5 5 6 draw_picture picture-number y x ; .ENABL LSB DRWPIC:: .INSTR "draw_picture",#3 RETURN ; ; EXT:6 6 6 picture_data picture-number array ?(label) ; .ENABL LSB PICDAT:: .INSTR "picture_data",#2 MOV (R2)+,R3 ; Get picture number. BNE 10$ ; Valid number? .PUTWB R3,#0 ; Picture 0 means return pictures... CALLR BTRUE ; And we're happy. 10$: .IF NE 0 MOV 2(R2),R0 .PUTWB R0,#1 ADD #2,R0 .PUTWB R0,#1 CALLR BTRUE .IFF CALLR BFALSE ; We always fail for now. .ENDC ; ; EXT:28 1C 6 picture_table table ; .ENABL LSB PICTBL:: .INSTR "picture_table",#1 RETURN ; ; EXT:7 7 6 erase_picture picture-number y x ; .ENABL LSB ERPIC:: .INSTR "erase_picture",#3 RETURN ; .END