home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
MBUG
/
MBUG159.ARC
/
MAZE.LBR
/
THEEND.MZC
/
THEEND.MAC
Wrap
Text File
|
1979-12-31
|
14KB
|
588 lines
EXT INTFLG,size,start,wait
THEEND::
ld c,5
call wait
lD A,(INTFLG)
OR A
; JP Z,BORING
LD HL,0FA00h ;Warp out.
LD B,10H
CALL WTSCRP
LOOP: LD (HL),0
INC HL
DJNZ LOOP
LD HL,0F000H
LD DE,010H
LD C,010H
CALL WTSCRP
LD A,020H
LOOP1: LD B,030H
LOOP2: CP (HL)
JR NZ,JUMP
LD (HL),0a0h
JUMP: INC HL
DJNZ LOOP2
ADD HL,DE
DEC C
JR NZ,LOOP1
CALL WTSCRN
LD HL,TELMES
LD DE,0F391H
LD BC,0EH
LDIR
LD HL,0F800H
LD DE,BUFFA
LD BC,00210H
CALL WTSCRP
LDIR
LD HL,FAZTAB
LD (FAZPOS),HL
LD E,040H
LOOP3: LD HL,BUFFA
LD C,042H
PUSH DE
LOOP4: LD B,8
LD DE,(FAZPOS)
LOOP5: LD A,(DE)
INC DE
OR (HL)
LD (HL),A
INC HL
DJNZ LOOP5
DEC C
JR NZ,LOOP4
LD (FAZPOS),DE
LD HL,BUFFA
LD DE,0F800H
LD BC,00210H
CALL WTSCRP
LDIR
POP DE
DEC E
JR NZ,LOOP3
LD HL,0F000H
LD DE,010H
LD C,E
CALL WTSCRP
LOOPE1: LD B,030H
LOOPE2: LD (HL),080H
INC HL
DJNZ LOOPE2
ADD HL,DE
DEC C
JR NZ,LOOPE1
;Place alian
LD A,88H
LD HL,0F0E6H
LD B,7
LOOPQ0: LD (HL),A
INC A
INC HL
DJNZ LOOPQ0
LD HL,0F126H
LD B,8
LOOPQ1: LD (HL),A
INC A
INC HL
DJNZ LOOPQ1
LD HL,0F165H
LD B,9
LOOPQ2: LD (HL),A
INC HL
INC A
DJNZ LOOPQ2
;Convert size into an integer from one to five.
ld a,(size)
sub 2
ld (size),a
;Size = 1 ?
LD A,(SIZE)
CP 1
JR Z,SIZE1
;Place horizon PGC.
LD A,080H ;First PGC
LD DE,010H
LD HL,0F200H
LD C,8
LOOPE3: LD B,030H
LOOPE4: LD (HL),A
INC L
DJNZ LOOPE4
ADD HL,DE
INC A
DEC C
JR NZ,LOOPE3
SIZE1: LD HL,TELMES
LD DE,0F391H
LD BC,0EH
LDIR
;Warp in.
LD HL,FAZTAB+1FFH
EXX
LD B,40H
LOOPE5: LD DE,BUFFA
LD HL,PGC2B
EXX
LD C,40H
LD D,H
LD E,L
LOOPE6: LD B,8H
LD H,D
LD L,E
LOOPE7: LD A,(HL)
DEC HL
EXX
OR (HL)
INC HL
LD (DE),A
INC DE
EXX
DJNZ LOOPE7
DEC C
JR NZ,LOOPE6
EXX
PUSH BC
LD BC,0200H
LD DE,0F800H
LD HL,BUFFA
CALL WTSCRP
LDIR
POP BC
DJNZ LOOPE5
LD BC,0290H
LD DE,0F800H
LD HL,PGC2B
CALL WTSCRP
LDIR
LD A,(SIZE)
CP 1
LD A,020H
JR Z,JUMPQ0
LD A,086H
JUMPQ0: LD B,0EH
LD HL,0F391H
LOOPR9: LD (HL),A
INC HL
DJNZ LOOPR9
;Clear bubble
LD HL,0FC00H
LD BC,220H
CALL WTSCRN
LOOPR0: LD (HL),0
INC HL
DEC BC
LD A,C
OR B
JR NZ,LOOPR0
;Clear buffa
LD HL,BUFFA
LD BC,0230H
LOOPC0: LD (HL),0
INC HL
DEC BC
LD A,B
OR C
JR NZ,LOOPC0
;2 Secound delay
LD A,(SIZE)
XOR 5
LD (BIGFLG),A
LD B,08H
LOOPR1: PUSH BC
CALL SCROLL
POP BC
DJNZ LOOPR1
;Place bubble
LD HL,0F081H
LD (HL),0A0H
INC L
LD B,22H
LOOPQ3: LD (HL),0A1H
INC L
DJNZ LOOPQ3
LD (HL),0A2H
LD HL,0F0C1H
LD (HL),0A3H
INC L
LD A,0C0H
LD B,22H
LOOPQ4: LD (HL),A
INC A
INC L
DJNZ LOOPQ4
LD (HL),0A4H
LD HL,0F101H
LD (HL),0A5H
LD B,22H
INC L
LOOPQ5: LD (HL),0A6H
INC L
DJNZ LOOPQ5
LD (HL),0A7H
INC L
LD (HL),0A8H
LD A,1
OUT (0BH),A
LD A,(SIZE)
LD H,0
ADD A,A
LD L,A
LD DE,TXPTTB-2
ADD HL,DE
LD E,(HL)
INC HL
LD D,(HL)
LD (TXTPNT),DE
LD A,(DE)
LOOPE9: LD L,A
LD H,0FH
ADD HL,HL
ADD HL,HL
INC L
ADD HL,HL
ADD HL,HL
LD DE,BUFFA+198H
LD BC,00CH
LDIR
CALL SCROLL
LD HL,(TXTPNT)
INC HL
LD A,(HL)
LD (TXTPNT),HL
OR A
JR NZ,LOOPE9
LD B,022H
LOOPE0: PUSH BC
CALL SCROLL
POP BC
DJNZ LOOPE0
ld c,30
call wait
jp start
SCROLL: LD B,8
LOOPS9: PUSH BC
LD A,036H
CALL KEY
JR C,RDEND
LD A,030H
CALL KEY
JR C,RDEND
LD HL,BUFFA+198H ;22H*0CH
LD C,0CH
LD DE,-0CH
LOOPS1: PUSH HL
LD B,11H
OR A
RL (HL)
EX AF,AF'
ADD HL,DE
EX AF,AF'
LOOPS2: RL (HL)
EX AF,AF'
ADD HL,DE
EX AF,AF'
RL (HL)
EX AF,AF'
ADD HL,DE
EX AF,AF'
DJNZ LOOPS2
POP HL
INC HL
DEC C
JR NZ,LOOPS1
LD HL,BUFFA
LD DE,0FC04H
CALL WTSCRN
LD A,023H
LOOPZ0: LD BC,0CH
LDIR
INC DE
INC DE
INC DE
INC DE
DEC A
JR NZ,LOOPZ0
LD A,(BIGFLG)
OR A
CALL Z,GROUND
POP BC
DJNZ LOOPS9
RET
RDEND: POP HL
POP HL
RET
;Ground scroll
GROUND: LD A,(EVEN)
XOR 1
LD (EVEN),A
JR NZ,REAL
LD HL,3410H
LD DE,0F810H
LD BC,070H
LDIR
RET
;The real bit.
REAL: LD HL,03480H
LD A,(OFFSET)
DEC A
AND 0FH
LD (OFFSET),A
LD E,A
DARK: LD A,E
ADD A,08H
BIT 7,A
RET NZ
LD E,A
LD D,1H
LD A,08H
LOOPG1: ADD A,A
SUB E
JR NC,JUMPG0
ADD A,E
JUMPG0: RL D
JR NC,LOOPG1
LD A,D
CPL
LOOPG2: CP L
JR NC,LIGHT
DEC L
LD (HL),055H
CP L
JR NC,LIGHT
DEC L
LD (HL),0AAH
JR LOOPG2
LIGHT: LD A,E
ADD A,8
BIT 7,A
RET NZ
LD E,A
LD D,1
LD A,08H
LOOPG3: ADD A,A
SUB E
JR NC,JUMPG1
ADD A,E
JUMPG1: RL D
JR NC,LOOPG3
LD A,D
CPL
LOOPG4: CP L
JR NC,DARK
DEC L
LD (HL),011H
CP L
JR NC,DARK
DEC L
LD (HL),44H
JR LOOPG4
OFFSET: DB 0
WTSCRP DEFL $
LOOPP: IN A,(0CH)
BIT 5,A
JR Z,LOOPP
WTSCRN DEFL $
LOOP6: IN A,(0CH)
BIT 5,A
JR NZ,LOOP6
LOOP7: IN A,(0CH)
BIT 5,A
JR Z,LOOP7
RET
KEY: OR A
RET
FAZPOS: DEFW FAZTAB
BIGFLG: DEFB 01H
EVEN: DB 0H
TXTPNT: DW 00
TXPTTB: DW TEXT1
DW TEXT2
DW TEXT3
DW TEXT4
DW TEXT5
BUFFA defl 03000H
TELMES: DEFM ' Teleporting. '
text1: db 'Bravo. You have just completed the esiest maze, well done.',0
TEXT2: DEFM 'Well done earth being. You have completed the second easist'
db ' maze.'
DB 0
text3: db 'Good one mate. You have completed the third hardest maze. '
db 'Betya it wasn',27h,'t worth all that sweat and time just to see '
db 'this boaring message.',0
text4: db '**** WOW **** you know that was some feat. Just shows to go '
db 'you what time and effort is taken up by useless tasks.',0
TEXT5: DEFM '******* Great stuff kido. You have just done the'
db ' hardest, biggest maze. I think that deserves a cup of tea'
db ' or a chocky bicky or something. *******'
DB 0
faztab: db 000h,000h,000h,010h,000h,000h,000h,000h ;||||||||
db 000h,000h,000h,018h,000h,000h,000h,000h ;||||||||
db 000h,000h,000h,018h,008h,000h,000h,000h ;||||||||
db 000h,000h,000h,018h,018h,000h,000h,000h ;||||||||
db 000h,000h,000h,038h,018h,000h,000h,000h ;|||8||||
db 000h,000h,000h,038h,038h,000h,000h,000h ;|||88|||
db 000h,000h,010h,038h,038h,000h,000h,000h ;|||88|||
db 000h,000h,010h,038h,038h,010h,000h,000h ;|||88|||
db 000h,000h,010h,03Ch,038h,010h,000h,000h ;|||<8|||
db 000h,000h,010h,03Ch,03Ch,010h,000h,000h ;|||<<|||
db 000h,000h,010h,03Ch,03Ch,010h,000h,000h ;|||<<|||
db 000h,000h,018h,03Ch,03Ch,010h,000h,000h ;|||<<|||
db 000h,000h,018h,03Ch,03Ch,018h,000h,000h ;|||<<|||
db 000h,000h,01Ch,03Ch,03Ch,018h,000h,000h ;|||<<|||
db 000h,000h,01Ch,03Ch,03Ch,038h,000h,000h ;|||<<8||
db 000h,000h,01Ch,03Eh,03Ch,038h,000h,000h ;|||><8||
db 000h,000h,01Ch,03Eh,07Ch,038h,000h,000h ;|||>|8||
db 000h,000h,01Ch,03Eh,07Ch,03Ch,000h,000h ;|||>|<||
db 000h,000h,03Ch,03Eh,07Ch,03Ch,000h,000h ;||<>|<||
db 000h,000h,03Ch,03Eh,07Eh,03Ch,000h,000h ;||<>~<||
db 000h,000h,03Ch,07Eh,07Eh,03Ch,000h,000h ;||<~~<||
db 000h,000h,03Ch,07Eh,07Eh,03Ch,008h,000h ;||<~~<||
db 000h,010h,03Ch,07Eh,07Eh,03Ch,008h,000h ;||<~~<||
db 000h,010h,03Ch,07Eh,07Eh,03Ch,018h,000h ;||<~~<||
db 000h,018h,03Ch,07Eh,07Eh,03Ch,018h,000h ;||<~~<||
db 000h,018h,07Ch,07Eh,07Eh,03Ch,018h,000h ;|||~~<||
db 000h,018h,07Ch,07Eh,07Eh,03Eh,018h,000h ;|||~~>||
db 000h,018h,07Ch,07Eh,07Eh,07Eh,018h,000h ;|||~~~||
db 000h,018h,07Eh,07Eh,07Eh,07Eh,018h,000h ;||~~~~||
db 000h,018h,07Eh,07Eh,07Eh,07Eh,01Ch,000h ;||~~~~||
db 000h,01Ch,07Eh,07Eh,07Eh,07Eh,01Ch,000h ;||~~~~||
db 000h,01Ch,07Eh,07Eh,07Eh,07Eh,03Ch,000h ;||~~~~<|
db 000h,03Ch,07Eh,07Eh,07Eh,07Eh,03Ch,000h ;|<~~~~<|
db 000h,03Ch,07Eh,0FEh,07Eh,07Eh,03Ch,000h ;|<~|~~<|
db 000h,03Ch,07Eh,0FEh,07Fh,07Eh,03Ch,000h ;|<~||~<|
db 000h,03Ch,07Eh,0FEh,0FFh,07Eh,03Ch,000h ;|<~||~<|
db 000h,03Ch,07Eh,0FFh,0FFh,07Eh,03Ch,000h ;|<~||~<|
db 000h,03Ch,07Eh,0FFh,0FFh,07Eh,03Ch,010h ;|<~||~<|
db 008h,03Ch,07Eh,0FFh,0FFh,07Eh,03Ch,010h ;|<~||~<|
db 018h,03Ch,07Eh,0FFh,0FFh,07Eh,03Ch,010h ;|<~||~<|
db 018h,03Ch,07Eh,0FFh,0FFh,07Eh,03Ch,018h ;|<~||~<|
db 018h,03Ch,07Eh,0FFh,0FFh,07Fh,03Ch,018h ;|<~|||<|
db 018h,03Ch,0FEh,0FFh,0FFh,0FFh,03Ch,018h ;|<||||<|
db 018h,03Ch,0FFh,0FFh,0FFh,0FFh,03Ch,018h ;|<||||<|
db 018h,03Ch,0FFh,0FFh,0FFh,0FFh,03Ch,038h ;|<||||<8
db 01Ch,03Ch,0FFh,0FFh,0FFh,0FFh,03Ch,038h ;|<||||<8
db 03Ch,03Ch,0FFh,0FFh,0FFh,0FFh,03Ch,038h ;<<||||<8
db 03Ch,03Ch,0FFh,0FFh,0FFh,0FFh,03Ch,03Ch ;<<||||<<
db 03Ch,03Eh,0FFh,0FFh,0FFh,0FFh,03Ch,03Ch ;<>||||<<
db 03Ch,03Eh,0FFh,0FFh,0FFh,0FFh,07Ch,03Ch ;<>|||||<
db 03Ch,03Eh,0FFh,0FFh,0FFh,0FFh,07Eh,03Ch ;<>||||~<
db 03Ch,07Eh,0FFh,0FFh,0FFh,0FFh,07Eh,03Ch ;<~||||~<
db 03Ch,07Eh,0FFh,0FFh,0FFh,0FFh,07Fh,03Ch ;<~|||||<
db 03Ch,0FEh,0FFh,0FFh,0FFh,0FFh,07Fh,03Ch ;<||||||<
db 03Ch,0FEh,0FFh,0FFh,0FFh,0FFh,0FFh,03Ch ;<||||||<
db 03Ch,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,03Ch ;<||||||<
db 03Ch,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,03Eh ;<||||||>
db 07Ch,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,03Eh ;|||||||>
db 07Eh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,03Eh ;~||||||>
db 07Eh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,07Eh ;~||||||~
db 07Eh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FEh ;~|||||||
db 07Eh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh ;~|||||||
db 07Fh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh ;||||||||
db 0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh ;||||||||
pgc2b: db 000h,000h,000h,000h,000h,000h,000h,000h ;||||||||
db 000h,000h,000h,000h,000h,000h,000h,000h ;||||||||
db 0AAh,055h,011h,0AAh,055h,044h,011h,0AAh ;|U||UD||
db 055h,011h,044h,011h,055h,0AAh,055h,044h ;U|D|U|UD
db 011h,044h,011h,0AAh,055h,0AAh,055h,0AAh ;|D||U|U|
db 055h,044h,011h,044h,011h,044h,011h,044h ;UD|D|D|D
db 011h,055h,0AAh,055h,0AAh,055h,0AAh,055h ;|U|U|U|U
db 0AAh,055h,0AAh,055h,0AAh,055h,011h,044h ;|U|U|U|D
db 011h,044h,011h,044h,011h,044h,011h,044h ;|D|D|D|D
db 011h,044h,011h,044h,011h,044h,011h,044h ;|D|D|D|D
db 011h,055h,0AAh,055h,0AAh,055h,0AAh,055h ;|U|U|U|U
db 0AAh,055h,0AAh,055h,0AAh,055h,0AAh,055h ;|U|U|U|U
db 0AAh,055h,0AAh,055h,0AAh,055h,0AAh,055h ;|U|U|U|U
db 0AAh,055h,0AAh,055h,0AAh,055h,0AAh,055h ;|U|U|U|U
db 0AAh,055h,0AAh,055h,0AAh,055h,0AAh,055h ;|U|U|U|U
db 044h,011h,044h,011h,044h,011h,044h,011h ;D|D|D|D|
db 000h,000h,000h,000h,000h,000h,000h,000h ;||||||||
db 000h,000h,000h,000h,000h,0C0h,0A0h,058h ;|||||||X
db 007h,018h,020h,040h,040h,080h,080h,080h ;|||@@|||
db 040h,058h,034h,01Ah,00Dh,002h,002h,001h ;@X4|||||
db 0E0h,01Ch,003h,000h,000h,000h,000h,000h ;||||||||
db 000h,000h,000h,000h,000h,080h,0C0h,070h ;|||||||p
db 000h,000h,000h,080h,040h,020h,010h,011h ;||||@|||
db 00Ah,00Ch,018h,010h,010h,020h,020h,020h ;||||||||
db 000h,000h,003h,00Ch,010h,060h,080h,000h ;|||||`||
db 000h,000h,000h,000h,000h,000h,000h,000h ;||||||||
db 000h,0FEh,001h,000h,000h,000h,000h,000h ;||||||||
db 000h,000h,000h,000h,000h,000h,000h,003h ;||||||||
db 000h,000h,080h,040h,020h,020h,010h,010h ;|||@||||
db 010h,010h,010h,020h,020h,040h,080h,000h ;|||||@||
db 024h,01Ah,00Ah,005h,003h,002h,002h,002h ;$|||||||
db 004h,008h,009h,008h,004h,00Bh,034h,0C8h ;||||||4|
db 001h,00Fh,070h,080h,018h,020h,00Ch,012h ;||p|||||
db 00Ch,081h,081h,070h,01Fh,007h,0E0h,01Fh ;|||p||||
db 048h,076h,00Dh,0E2h,001h,060h,090h,062h ;Hv|||`|b
db 001h,082h,08Ch,030h,0E1h,0CFh,03Fh,0EFh ;|||0||?|
db 040h,040h,040h,0C0h,0C0h,030h,00Bh,004h ;@@@||0||
db 084h,008h,030h,0C0h,0E0h,0E0h,0E1h,0A1h ;||0|||||
db 000h,000h,000h,001h,00Fh,07Ch,0F8h,0F8h ;||||||||
db 07Ch,07Ch,07Ch,07Ch,0F8h,0F8h,0F0h,0F0h ;||||||||
db 004h,018h,060h,080h,0FFh,01Fh,01Fh,00Fh ;||`|||||
db 00Fh,00Fh,00Fh,00Fh,01Fh,01Fh,01Fh,03Eh ;|||||||>
db 000h,000h,000h,000h,000h,0F0h,00Eh,087h ;||||||||
db 083h,083h,083h,083h,003h,003h,003h,007h ;||||||||
db 000h,000h,000h,000h,000h,000h,000h,0C0h ;||||||||
db 0F0h,0C8h,0E4h,0E2h,0E2h,0E1h,0E1h,0C1h ;||||||||
db 00Fh,030h,040h,083h,092h,06Ch,000h,000h ;|0@||l||
db 000h,000h,000h,000h,000h,000h,000h,000h ;||||||||
db 0B0h,0C0h,080h,000h,007h,018h,020h,022h ;|||||||"
db 01Ch,003h,000h,000h,000h,000h,000h,000h ;||||||||
db 000h,000h,003h,004h,0CEh,033h,001h,001h ;|||||3||
db 09Eh,060h,000h,000h,000h,000h,000h,000h ;|`||||||
db 048h,090h,020h,040h,080h,000h,000h,000h ;H||@||||
db 000h,000h,000h,000h,000h,000h,000h,000h ;||||||||
db 01Bh,007h,001h,002h,002h,002h,004h,004h ;||||||||
db 004h,004h,004h,004h,003h,000h,000h,000h ;||||||||
db 0E0h,0A0h,0A0h,0B8h,097h,0D0h,0C8h,0A8h ;||||||||
db 0A7h,0B0h,0CFh,01Ch,0E4h,002h,002h,001h ;||||||||
db 03Eh,07Ch,0F8h,0F8h,0F0h,0F0h,00Fh,018h ;>|||||||
db 0E4h,064h,0C4h,062h,062h,0A2h,092h,014h ;|d|bb|||
db 007h,00Fh,00Fh,01Fh,03Fh,03Eh,0C0h,000h ;||||?>||
db 000h,000h,000h,000h,000h,000h,000h,000h ;||||||||
db 0C2h,084h,088h,030h,0C0h,000h,000h,000h ;|||0||||
db 000h,000h,000h,000h,000h,000h,000h,000h ;||||||||
db 000h,000h,000h,000h,000h,000h,000h,000h ;||||||||
db 000h,000h,000h,00Fh,030h,040h,040h,080h ;||||0@@|
db 000h,000h,000h,000h,000h,000h,000h,000h ;||||||||
db 000h,000h,000h,0FFh,000h,000h,000h,000h ;||||||||
db 000h,000h,000h,000h,000h,000h,000h,000h ;||||||||
db 000h,000h,000h,0F0h,00Ch,002h,002h,001h ;||||||||
db 080h,080h,080h,080h,080h,080h,080h,080h ;||||||||
db 080h,080h,080h,080h,080h,080h,080h,080h ;||||||||
db 001h,001h,001h,001h,001h,001h,001h,001h ;||||||||
db 001h,001h,001h,001h,001h,001h,001h,001h ;||||||||
db 080h,040h,040h,030h,00Fh,000h,000h,000h ;|@@0||||
db 000h,000h,000h,000h,000h,000h,000h,000h ;||||||||
db 000h,000h,000h,000h,0FFh,000h,000h,000h ;||||||||
db 000h,000h,000h,000h,000h,000h,000h,000h ;||||||||
db 001h,001h,001h,001h,0F1h,00Ch,002h,001h ;||||||||
db 000h,000h,000h,000h,000h,000h,000h,000h ;||||||||
db 000h,000h,000h,000h,000h,080h,040h,0B0h ;||||||@|
db 07Ch,00Fh,000h,000h,000h,000h,000h,000h ;||||||||
BORING: RET
END