![]()  | 
Routines | 
| Prev: 6C00 | Up: Map | Next: 6CEC | 
| 
 
This section draws the "Squiggle" line which separates the windows.
 
 | 
|||||
  | 
|||||
| SquiggleLine | 6CCD | CALL ClearScreen | Call ClearScreen. | ||
| 6CD0 | LD HL,$5140 | HL=5140 (screen buffer position). | |||
| 6CD3 | LD DE,$6DCC | DE=SquiggleGFX. | |||
| 6CD6 | LD C,$05 | C=05. | |||
| SquiggleGFX_Outer_Loop | 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_Inner_Loop | 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_Inner_Loop | Decrease counter by one and loop back to SquiggleGFX_Inner_Loop 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_Outer_Loop until counter is zero. | |||
| 6CEA | JR NZ,SquiggleGFX_Outer_Loop | ||||
| 
 
Continue on to 6CEC.
 
 | 
|||||
| Prev: 6C00 | Up: Map | Next: 6CEC |