Код: Выделить всё
device zxspectrum128
ORG 40000
begin
;ORG 40000
;ENT
;
;---- FORM SHOW ----
;
ld sp,$5FFF
ld a,#10,bc,#7FFD:out (c),a
LD HL,35000
LD DE,35001
LD BC,4095
LD (HL),0;LDIR
LD HL,25000
LD DE,#D820
LD (HL),#01:INC HL
LD (HL),#FD:INC HL
LD (HL),#7F:INC HL
LD (HL),#11:INC HL
LD (HL),#1D:INC HL
LD (HL),#17:INC HL
LD C,#40
M1 LD (HL),#ED:INC HL
BIT 0,C:JR NZ,M2
LD (HL),#51;D[#A][#2];[#A][#2]D
JR M3
M2 LD (HL),#59;E[#A][#2]E
M3 INC HL
LD (HL),#31:INC HL
LD (HL),E:INC HL
LD (HL),D:INC HL
LD B,16
M4 LD (HL),#21:INC HL
M5 LD (HL),#00:INC HL
M6 LD (HL),#07:INC HL
LD (HL),#E5:INC HL
DJNZ M4
LD B,15
M8 LD (HL),#23:INC HL
DJNZ M8
LD A,(M5+1)
LD (M6+1),A:XOR 7
LD (M5+1),A
DEC C:LD A,C:AND 3
JR NZ,M7
PUSH HL:LD HL,32
ADD HL,DE:EX DE,HL
POP HL
M7 LD A,C:OR A
JR NZ,M1
LD DE,BACK
LD (HL),#C3:INC HL
LD (HL),E:INC HL
LD (HL),D
LD IX,TAB:LD HL,#61F0
LD BC,#400
PT1 LD (IX),L:INC IX
LD (IX),H:INC IX
LD DE,4:OR A
SBC HL,DE:DEC BC
LD A,C:AND #0F
JR NZ,PT1:LD DE,148
ADD HL,DE:LD A,B
OR C:JR NZ,PT1
LD (IX),0:LD (IX+1),0
;
;---- SETTIN' IM 2 --
;
DI:LD A,#3B:LD I,A:IM 2
LD A,#C9:LD (#FFFF),A
;
;---- FORM PATT
;
YEP LD BC,#7FFD:LD A,#15
CALL AGA:LD A,#17
CALL AGA:LD A,#10
OUT (C),A;CALL PATT2
JR RUN
HUJ LD (STORE+1),SP
LD SP,TAB
LD HL,35000
L2 POP DE:LD A,D:OR E
JR Z,STORE:LD A,(HL)
RLA:RLA:RLA:INC HL
OR (HL):INC HL:LD (DE),A
INC DE:LD A,(HL)
RLA:RLA:RLA:INC HL
OR (HL):INC HL:LD (DE),A
JR L2
STORE LD SP,0:RET
RUN CALL HUJ
LOOP EI:HALT:DI
XOR A:OUT (254),A
;
;---- TIMIN' DELAY
;
L0 LD BC,#02D3
L1 DEC BC:LD A,B:OR C
JP NZ,L1
LD (BACK+1),SP
JP 25000
BACK LD SP,0
LD A,#10:OUT (C),A
LD BC,#EFFE:IN A,(C)
CPL:AND 31:LD HL,(L0+1)
BIT 4,A:JR Z,RGHT
LD DE,1:OR A
SBC HL,DE:ADD HL,DE
JR Z,END:DEC HL
RGHT BIT 3,A:JR Z,END
INC HL
END LD (L0+1),HL
LD A,1:OUT (254),A
LD A,127:IN A,(254)
RRA:JR C,LOOP
DI:LD A,#3F:LD I,A
IM 1:EI:RET
AGA OUT (C),A:PUSH BC
LD HL,#C000
LD DE,#C001
LD BC,#0FFF
LD (HL),#0F:LDIR
POP BC:RET
TAB:; EQU $
end
display /d,end-begin
savesna "!void.sna",begin