![]() |
Routines |
| Prev: E871 | Up: Map | Next: E8E0 |
|
|
||||
|
Sets the top two rows of the attribute buffer to magenta paper with white ink.
|
||||
| PINK_HEADER | E891 | LD HL,$5800 | Writes $1F (Magenta/ White) to the top two rows of the attribute buffer. | |
| E894 | LD B,$40 | |||
| PINK_HEADER_LOOP | E896 | LD (HL),$1F | ||
| E898 | INC L | |||
| E899 | DJNZ PINK_HEADER_LOOP | |||
|
Source is currently $5840, we write $06 (Black/Yellow) to the memory location held in the source register. Target is then just "source+1", so the LDIR just fast copies into the following $01BF memory locations (up to $59FF accounting for the top two-thirds of the screen).
|
||||
| CLEAR_START_SCREEN | E89B | LD D,H | Write $06 (Black/ Yellow) to the next $01BF memory locations of the attribute buffer | |
| E89C | LD E,L | |||
| E89D | INC E | |||
| E89E | LD BC,$01BF | |||
| E8A1 | LD (HL),$06 | |||
| E8A3 | LDIR | |||
| E8A5 | EXX | Exchange BC, DE, and HL with shadow registers with BC', DE', and HL' | ||
|
From here onward fills the screen buffer with text/ images. Starting with the "welcome" text.
|
||||
| E8A6 | LD DE,$4000 | DE=$4000 (top of the screen buffer) | ||
| E8A9 | EXX | Exchange BC, DE, and HL with shadow registers with BC', DE', and HL' | ||
| E8AA | LD HL,$E871 | Point HL to WELCOME_TEXT ($20 characters in length) and call PRINT_STRING | ||
| E8AD | LD B,$20 | |||
| E8AF | CALL PRINT_STRING | |||
|
This section handles the cute row of bike graphics in the top of the display.
|
||||
| E8B2 | LD B,$10 | B=$10 (number of bike UDGs to display) | ||
| BANNER_BIKE_GRAPHIC_LOOP | E8B4 | EXX | Exchange BC, DE, and HL with shadow registers with BC', DE', and HL' | |
| E8B5 | LD L,$9C | Point HL to BIKE_GRAPHIC and call PRINT_BIKE_GRAPHIC this prints the left half of the bike graphic | ||
| E8B7 | CALL PRINT_BIKE_GRAPHIC | |||
| E8BA | EXX | Exchange BC, DE, and HL with shadow registers with BC', DE', and HL' | ||
| E8BB | CALL PRINT_BIKE_GRAPHIC | Calling the subroutine PRINT_BIKE_GRAPHIC again prints the right half of the bike graphic | ||
| E8BE | DJNZ BANNER_BIKE_GRAPHIC_LOOP | Decrease bike counter by one, jump back to BANNER_BIKE_GRAPHIC_LOOP if not zero | ||
|
This loop prints the "start screen text" in blocks of $40 characters (two rows at a time).
|
||||
| E8C0 | LD C,$04 | C=$04 (there are 4 blocks of text to display) | ||
| E8C2 | EXX | Exchange BC, DE, and HL with shadow registers with BC', DE', and HL' | ||
| E8C3 | LD DE,$4060 | DE=$4060 (position in screen buffer we're writing to) | ||
| E8C6 | EXX | Exchange BC, DE, and HL with shadow registers with BC', DE', and HL | ||
| E8C7 | LD HL,$A800 | Point HL to START_SCREEN_TEXT ($40 characters in length) and call PRINT_STRING | ||
| START_SCREEN_TEXT_LOOP | E8CA | LD B,$40 | ||
| E8CC | CALL PRINT_STRING | |||
| E8CF | EXX | Exchange BC, DE, and HL with shadow registers with BC', DE', and HL' | ||
| E8D0 | LD A,E | Meh | ||
| E8D1 | AND A | |||
| E8D2 | JR NZ,START_SCREEN_TEXT_SKIP | |||
| E8D4 | LD D,$48 | |||
| START_SCREEN_TEXT_SKIP | E8D6 | ADD A,$20 | ||
| E8D8 | LD E,A | |||
| E8D9 | EXX | Exchange BC, DE, and HL with shadow registers with BC', DE', and HL' | ||
| E8DA | DEC C | |||
| E8DB | JR NZ,START_SCREEN_TEXT_LOOP | |||
| E8DD | JP PAUSE | Jump to PAUSE | ||
| Prev: E871 | Up: Map | Next: E8E0 |