mirror of
https://github.com/antoinevignau/source.git
synced 2025-01-04 04:31:04 +00:00
89 lines
1.0 KiB
NASM
89 lines
1.0 KiB
NASM
|
||
;; 10 PRINT USR 16514"tIL FAUDRAIT PEUT ETRE DU FEU..–AH,AH...VOUS ETES PRISONNIEr"
|
||
|
||
|
||
EXTERR .equ $005B ; Basic Break function ! Ignore line instructions.
|
||
CURSEUR .equ $8F5 ; Point to PRINT AT DEST.(BC=X,Y)
|
||
CHAINE .equ $B6B ; PRINT A CHAINE (BC=LEN;DE=TEXT LOC)
|
||
|
||
|
||
.Org $417B
|
||
|
||
LD HL,($4016)
|
||
LD BC,($407B)
|
||
NEXTCHAR:
|
||
INC HL
|
||
LD A,(HL)
|
||
CP $76
|
||
JP Z,EXTERR
|
||
BIT 7,A
|
||
JR Z,NEXTCHAR
|
||
DEC BC
|
||
LD A,B
|
||
OR C
|
||
JR NZ,NEXTCHAR
|
||
DISPLAY:
|
||
INC HL
|
||
LD A,(HL)
|
||
BIT 7,A
|
||
JR NZ,DISPLAY2
|
||
CP $0C
|
||
JR Z,NEXTLINE
|
||
CP $01
|
||
JR NZ,DISPLAY3
|
||
LD A,11
|
||
DISPLAY3:
|
||
RST 10H
|
||
JR DISPLAY
|
||
DISPLAY2:
|
||
RES 7,A
|
||
RST 10H
|
||
JP $005B
|
||
NEXTLINE:
|
||
LD DE,($400E)
|
||
NEXTCHR:
|
||
LD A,(DE)
|
||
CP $76
|
||
JR Z,DISPLAY
|
||
;EX DE,HL
|
||
;LD (HL),0
|
||
;EX DE,HL
|
||
LD A,0
|
||
RST 10h
|
||
INC DE
|
||
JR NEXTCHR
|
||
|
||
;TITRE REM TO SCREEN
|
||
|
||
LD DE,16514 ; FROM REM LINE
|
||
LD BC,$0606
|
||
LD ($407B),BC
|
||
|
||
NXTLINE:
|
||
PUSH DE
|
||
CALL CURSEUR
|
||
POP DE
|
||
LD H,D
|
||
LD L,E
|
||
LD BC,23
|
||
PUSH DE
|
||
CALL CHAINE
|
||
POP DE
|
||
EX DE,HL
|
||
LD BC,32
|
||
ADD HL,BC
|
||
EX DE,HL
|
||
|
||
LD BC,($407B)
|
||
INC B
|
||
LD ($407B),BC
|
||
LD A,B
|
||
CP 14
|
||
JR Z,EXIT
|
||
JR NXTLINE
|
||
EXIT:
|
||
LD BC,$0607
|
||
LD ($407B),BC
|
||
RET
|
||
|
||
.end |