?login_element?
?pathlinks? – Rev 992
Blame |
Last modification |
View Log
| Download
*Z80
;Начальное демо-меню для НЛО-2
D$ MAC
DI
HALT
ENDM
PUSH$ MAC
PUSH HL
PUSH DE
PUSH BC
ENDM
POP$ MAC
POP BC
POP DE
POP HL
ENDM
ORG #7000 ;->A полуряд 12345
ENT $
DI
IM 2
LD A,#71
LD I,A
JP TRISTA
DEFM " UFO-2 Beginning (c)1996 Mednonogov Slava "
DEFS #7100-$,#72
STK DEFS 260,#72
DEFS #7272-$,#72
INTRPT PUSH$
EXX
PUSH$
PUSH AF
EX AF,AF
PUSH AF
CALL XMUSIC+6
POP AF
EX AF,AF
POP AF
POP$
EXX
POP$
EI
RETI
SCR4
*B ..\DATA\XI4.DTA
SCR2
*B ..\DATA\XI1.DTA
XMU
*B ..\DATA\M_UFO.DTA
SCR1
*B ..\DATA\XI2.DTA
SCR3
*B ..\DATA\XI3.DTA
XMUSIC EQU 60000
TRISTA LD (STKR+1),SP
LD SP,STK-4
CALL OFFS
XOR A
OUT (254),A
LD HL,XMU+2
LD DE,XMUSIC-17
CALL DELPC
CALL XMUSIC
LO1 EI
LD HL,SCR3
LD DE,#4000
CALL DELPCS
HALT
CALL SW5
LD D,15
CALL WAIT
LD HL,SCR2
LD DE,#C000
PUSH DE
CALL DELPCS
HALT
CALL SW7
LD D,28
CALL WAIT
HALT
CALL SW5
LD D,20
CALL WAIT
LD HL,SCR1
POP DE
PUSH DE
CALL DELPCS
HALT
CALL SW7
LD D,24
CALL WAIT
HALT
CALL SW5
LD D,16
CALL WAIT
LD HL,SCR4
POP DE
CALL DELPCS
HALT
CALL SW7
LD D,22
CALL WAIT
JP LO1
STKR LD SP,#1111
DI
EX AF,AF
LD BC,65533 ;мyз off
LD A,7
OUT (C),A
LD BC,49149
LD A,#FF
OUT (C),A
IM 1
EX AF,AF
LD C,0
RRA
JR C,STK1
INC C
RRA
JR C,STK1
INC C
STK1 LD A,C
RET
WAIT LD BC,#F7FE
IN A,(C)
CPL
AND %111
JP NZ,STKR
LD B,25
LOw HALT
DJNZ LOw
LD B,#7F
IN A,(C)
AND 1
RET Z
DEC D
JR NZ,WAIT
RET Z
DELPCS PUSH DE
INC HL
INC HL
CALL DELPC
POP HL
LD A,#18
ADD A,H
LD H,A
LD A,3
LO02 LD B,0
LO00 SET 6,(HL)
INC HL
DJNZ LO00
DEC A
JR NZ,LO02
RET Z
;Декомпрессор
;HL-откуда DE-куда
DLPCB DEFS 4
DELPC PUSH DE
LD DE,DLPCB
LD BC,4
LDIR
POP DE
xpD0 LD A,(HL)
BIT 7,A
JR NZ,xpD1
PUSH AF
AND 1
LD B,A
LD A,(HL)
AND #E
RRCA
ADD A,3
LD C,A
xpD0X INC HL
LD A,E
SUB (HL)
INC HL
PUSH HL
LD L,A
LD A,D
SBC A,B
LD H,A
LD B,0
LDIR
D00 POP HL
POP AF
RLCA
RLCA
RLCA
RLCA
AND #F
JR Z,xpD0
JR xpDRR
xpD1 INC HL
BIT 6,A
JR NZ,xpD2
AND #3F
JR Z,xpDEND
xpDRR LD C,A
xpDLO LD A,(HL) ;неразрушающий
RRCA
LD (DE),A
INC DE
INC HL
DEC C
JP NZ,xpDLO
JR xpD0
xpD2 AND #3F
ADD A,4
LD C,A
LD A,(HL)
PUSH AF
AND #F
LD B,A
JR xpD0X
xpDEND LD HL,DLPCB
LD C,4
LDIR
RET
SCR EQU #C000
OFFS CALL SW7
LD DE,SCR+#1AFE
LD HL,SCR+#1AFF
LD BC,768
LD (HL),0
LDDR
LD BC,6143
LD (HL),255
LDDR
RET
SW7 LD A,%11111
SWW LD BC,#7FFD
OUT (C),A
RET
SW5 LD A,%10111
JR SWW
DEFS 5000,#FF
DEFM " MADE BY COOPER FEET "