Prev: 6C00 Up: Map Next: 6DCC
6CCD: Squiggle Line
This section draws the "Squiggle" line which separates the windows.
SquiggleLine 6CCD CALL ClearScreen Call ClearScreen.
6CD0 LD HL,$5140 HL=5140
6CD3 LD DE,$6DCC DE=SquiggleGFX
6CD6 LD C,$05 C=$05.
SquiggleGFX_Loop_1 6CD8 LD B,$10 Set a counter of $10.
6CDA PUSH HL Stash HL (the screen buffer pointer) temporarily - this is because the line is a repeated pattern.
SquiggleGFX_Loop_2 6CDB LD A,(DE) Copy one byte from DE (the squiggle graphics data), to HL (the screen buffer).
6CDC LD (HL),A
6CDD INC HL Increase both pointers by one.
6CDE INC DE
6CDF LD A,(DE) Copy one byte from DE (the squiggle graphics data), to HL (the screen buffer).
6CE0 LD (HL),A
6CE1 INC HL Increase HL (the screen buffer) pointer by one.
6CE2 DEC DE Decrease DE (the squiggle graphics data) pointer by one.
6CE3 DJNZ SquiggleGFX_Loop_2 Decrease counter by one and loop back to SquiggleGFX_Loop_2 until counter is zero.
6CE5 INC DE Increase DE (the squiggle graphics data) pointer by two.
6CE6 INC DE
6CE7 POP HL Restore HL (the screen buffer position) from the stack.
6CE8 INC H Increase H by one (i.e. move down a line).
6CE9 DEC C Decrease C by one and loop back to SquiggleGFX_Loop_1 until counter is zero.
6CEA JR NZ,SquiggleGFX_Loop_1
6CEC LD A,$11 Write $11 to B716.
6CEE LD ($B716),A
6CF1 LD A,($B706) A=B706.
6CF4 INC A Increase A by one.
6CF5 JR NZ,SquiggleLine_1 If A is not zero then jump to SquiggleLine_1.
6CF7 CALL $97AD Call 97AD.
6CFA LD HL,$6FF2 HL=InputBuffer
SquiggleLine_0 6CFD LD A,(HL)
6CFE CALL $85B8
6D01 INC HL
6D02 CP $0D
6D04 JR NZ,SquiggleLine_0
6D06 LD HL,$6FF4 Copies $6FF4 to $6FF9 ($05 bytes).
6D09 LD DE,$6FF9
6D0C LD BC,$0005
6D0F LDIR
6D11 JR SquiggleLine_2 Jump to SquiggleLine_2.
SquiggleLine_1 6D13 LD A,$01 Write $01 to B705.
6D15 LD ($B705),A
6D18 LD A,$09 Write $09 to B716.
6D1A LD ($B716),A
6D1D CALL $6DD6 Call 6DD6.
6D20 JR Z,SquiggleLine_6
SquiggleLine_2 6D22 LD HL,$709C Write $00 to 40 bytes, starting from 709C (using Blanker).
6D25 LD B,$40
6D27 CALL Blanker
6D2A LD HL,$6FF9 HL=6FF9.
6D2D LD IY,$709C IY=709C.
SquiggleLine_3 6D31 CALL $6E97 Call 6E97.
6D34 CP $D0
6D36 JR Z,SquiggleLine_8
6D38 CP $90
6D3A JR NZ,SquiggleLine_5
6D3C LD A,B
6D3D AND $0F
6D3F OR C
6D40 JR NZ,SquiggleLine_5
6D42 LD A,($B71B)
6D45 AND A
6D46 JR NZ,SquiggleLine_4
6D48 INC A
6D49 LD ($B71B),A
6D4C JR SquiggleLine_5
SquiggleLine_4 6D4E DEC A
6D4F LD ($B71B),A
6D52 LD A,(IY-$02)
6D55 AND $F0
6D57 CP $B0
6D59 JR Z,SquiggleLine_5
6D5B CP $A0
6D5D JR Z,SquiggleLine_5
6D5F LD A,$B0
6D61 LD (IY+$00),A
6D64 XOR A
6D65 LD (IY+$01),A
6D68 INC IY
6D6A INC IY
SquiggleLine_5 6D6C LD (IY+$00),B
6D6F LD (IY+$01),C
6D72 INC IY
6D74 INC IY
6D76 LD A,D
6D77 CP $C0
6D79 JR NZ,SquiggleLine_3
6D7B LD A,($B71B)
6D7E AND A
6D7F JR Z,SquiggleLine_6
6D81 XOR A
6D82 LD ($B71B),A
6D85 CALL $792F
6D88 JR SquiggleLine_1
SquiggleLine_6 6D8A LD HL,$709C
6D8D LD ($B6DC),HL
SquiggleLine_7 6D90 CALL $7585
6D93 JP NZ,SquiggleLine_1
6D96 CALL $7960
6D99 LD A,($B705)
6D9C AND A
6D9D JR NZ,SquiggleLine_7
6D9F JP SquiggleLine_1 Jump to SquiggleLine_1.
SquiggleLine_8 6DA2 LD HL,$AD93 HL="i do not know the word "[0x16]""
6DA5 LD A,$01 Write $01 to WaitCoutdown.
6DA7 LD ($B701),A
6DAA CALL PrintMsg Call PrintMsg.
6DAD LD HL,($B6DA)
SquiggleLine_9 6DB0 LD A,(HL)
6DB1 CP $0D
6DB3 JR Z,SquiggleLine_10
6DB5 CP $22
6DB7 JR Z,SquiggleLine_10
6DB9 CALL $858B
6DBC INC HL
6DBD CP $20
6DBF JR NZ,SquiggleLine_9
SquiggleLine_10 6DC1 LD A,$22
6DC3 CALL $858B
6DC6 CALL $8583
6DC9 JP SquiggleLine_1 Jump to SquiggleLine_1.
Prev: 6C00 Up: Map Next: 6DCC