Spectrum.EXE/macroses/macros.a80
2026-05-15 00:20:27 +10:00

73 lines
1006 B
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;
MACRO FRAM_ON
IN A,(FastRAM_ON)
IF Emulator
PUSH BC
PUSH AF
LD BC,#1FFD
XOR A
OUT (C),A
OUT (FastRam_BANK0),A
POP AF
POP BC
ENDIF
ENDM
MACRO FRAM_OFF
IN A,(FastRAM_OFF)
IF Emulator
PUSH BC
PUSH AF
LD BC,#1FFD
LD A,1
OUT (C),A
XOR A
OUT (FastRam_BANK0),A
POP AF
POP BC
ENDIF
ENDM
;
;
MACRO PrintProc
MODULE PrintF
;---------------------------------------
printstr:
; ¢ ॣ. HL  ¤à¥á ­  ¯¥ç â ¥¬ë© ¡ãä¥à
LD C,Dss.PChars
jp ToDSS
;---------------------------------------
;---------------------------------------
; ¢ ॣ. A ç¨á«® ¯¥ç â ¥¬®¥ ª ª hex
printhex:
LD D,A
RRCA
RRCA
RRCA
RRCA
AND #0F
ADD A,#30
CP #3A
JR C,.PRNH1
ADD A,7
.PRNH1:
CALL .PRINT_CHAR
LD A,D
AND #0F
ADD A,#30
CP #3A
JP C,.PRINT_CHAR
ADD A,7
JP .PRINT_CHAR
; ¢ ॣ¨áâॠA ᨬ¢®« ¤«ï ¯¥ç â¨
.PRINT_CHAR:
LD BC,#0182
JP ToBIOS
;---------------------------------------
ENDMODULE
ENDM
;
;