![]() |
Routines |
| Prev: 32672 | Up: Map | Next: 32867 |
|
Used by the routine at 32252.
|
||||||||||||||
| 32694 | LD IX,32683 | Point IX at start of second ASCII digit sequence for transport coordinate selection | ||||||||||||
| 32698 | LD A,E | Set x-coordinate of left and right of region to scroll to value in E (6, 8 or 10 characters depending upon value in E)... | ||||||||||||
| 32699 | LD (23489),A | ... | ||||||||||||
| 32702 | LD (23490),A | ... | ||||||||||||
| 32705 | LD A,D | Set y-coordinate of top of region to scroll to value in D (72 pixels)... | ||||||||||||
| 32706 | LD (23491),A | ... | ||||||||||||
| 32709 | ADD A,39 | Set y-coordinate of bottom of region to scroll to value in D plus 39 (pixels)... | ||||||||||||
| 32711 | LD (23492),A | ... | ||||||||||||
| 32714 | CALL 54942 | Capture keyboard or joystick input loading result into A | ||||||||||||
| 32717 | BIT 2,A | If up was pressed... | ||||||||||||
| 32719 | JR NZ,32761 | ...then skip ahead to 32761 | ||||||||||||
| 32721 | BIT 3,A | If down was pressed... | ||||||||||||
| 32723 | JR NZ,32814 | ...then skip ahead to 32814 | ||||||||||||
| 32725 | BIT 4,A | If fire was not pressed... | ||||||||||||
| 32727 | JR Z,32714 | ...then jump back to 32714 | ||||||||||||
| 32729 | PUSH IX | Store IX (current position in digit sequence) | ||||||||||||
| 32731 | LD A,(23489) | Load C with x-coordinate of left and right of region to scroll (characters)... | ||||||||||||
| 32734 | LD C,A | ... | ||||||||||||
| 32735 | LD A,(23491) | Load A with y-coordinate of top of region to scroll (pixels)... | ||||||||||||
| 32738 | ADD A,16 | ...plus 16 | ||||||||||||
| 32740 | RRCA | Divide result by 8... | ||||||||||||
| 32741 | RRCA | ... | ||||||||||||
| 32742 | RRCA | ... | ||||||||||||
| 32743 | LD B,A | ...and load result (y-coordinate of "selected" coordinate value in characters) into B | ||||||||||||
| 32744 | CALL 54148 | Load HL with attribute file address for coordinates (C, B)... | ||||||||||||
| 32747 | LD (HL),71 | ...and apply attribute 71 (white INK, black PAPER, BRIGHT) | ||||||||||||
| 32749 | CALL 35690 | Play upward scale sound | ||||||||||||
| 32752 | CALL 35723 | Play downward scale sound | ||||||||||||
| 32755 | POP IX | Restore IX (current position in digit sequence) | ||||||||||||
| 32757 | LD A,(IX+0) | Load (ASCII code of) currently selected digit into A | ||||||||||||
| 32760 | RET | Return | ||||||||||||
|
Up pressed
|
||||||||||||||
| 32761 | LD B,8 | Load B with 8, as we are scrolling by eight pixels | ||||||||||||
| 32763 | PUSH BC | Store BC (B = remaining number of pixels to scroll) | ||||||||||||
| 32764 | PUSH IX | Store IX (current position in digit sequence) | ||||||||||||
| 32766 | CALL 32886 | Make a click sound (reset Port 254 EAR bit, wait for interrupt then set EAR bit of Port 254) | ||||||||||||
| 32769 | CALL 55408 | Scroll a region of the display file up a pixel row with wrapping | ||||||||||||
| 32772 | CALL 32886 | Make a click sound (reset Port 254 EAR bit, wait for interrupt then set EAR bit of Port 254) | ||||||||||||
| 32775 | POP IX | Restore IX (current position in digit sequence) | ||||||||||||
| 32777 | POP BC | Restore BC (B = remaining number of pixels to scroll) | ||||||||||||
| 32778 | DJNZ 32763 | Decrease B (remaining number of pixels to scroll) and loop back to 32763 if not zero | ||||||||||||
| 32780 | INC IX | Increase IX to point to next digit in sequence | ||||||||||||
| 32782 | LD A,(IX+2) | Load digit that is two after current one into A... | ||||||||||||
| 32785 | OR A | ...and if this is zero (end marker)... | ||||||||||||
| 32786 | CALL Z,32867 | ...then subtract ten from IX to wrap from 9 to 0 | ||||||||||||
| 32789 | LD A,(23489) | Load C with x-coordinate of left and right of region to scroll (characters)... | ||||||||||||
| 32792 | LD C,A | ... | ||||||||||||
| 32793 | LD A,(23492) | Load A with y-coordinate of bottom of region to scroll (pixels)... | ||||||||||||
| 32796 | RRCA | ...divide by 8... | ||||||||||||
| 32797 | RRCA | ... | ||||||||||||
| 32798 | RRCA | ... | ||||||||||||
| 32799 | AND 31 | ...cap at 31 to give y-coordinate in characters, one character below bottom of the three visible "scrolling" digits... | ||||||||||||
| 32801 | LD B,A | ...and load result into B | ||||||||||||
| 32802 | CALL 54132 | Move virtual cursor (bitmap) to display file address for coordinates x=C, y=B and load address into HL | ||||||||||||
| 32805 | LD A,(IX+2) | Load A with digit two after currently selected one | ||||||||||||
| 32808 | CALL 54097 | Print character in A | ||||||||||||
| 32811 | JP 32714 | Loop back to 32714 for next keyboard / joystick input | ||||||||||||
|
Down pressed
|
||||||||||||||
| 32814 | LD B,8 | Load B with 8, as we are scrolling by eight pixels | ||||||||||||
| 32816 | PUSH BC | Store BC (B = remaining number of pixels to scroll) | ||||||||||||
| 32817 | PUSH IX | Store IX (current position in digit sequence) | ||||||||||||
| 32819 | CALL 32886 | Make a click sound (reset Port 254 EAR bit, wait for interrupt then set EAR bit of Port 254) | ||||||||||||
| 32822 | CALL 55442 | Scroll a region of the display file down a pixel row with wrapping | ||||||||||||
| 32825 | CALL 32886 | Make a click sound (reset Port 254 EAR bit, wait for interrupt then set EAR bit of Port 254) | ||||||||||||
| 32828 | POP IX | Restore IX (current position in digit sequence) | ||||||||||||
| 32830 | POP BC | Restore BC (B = remaining number of pixels to scroll) | ||||||||||||
| 32831 | DJNZ 32816 | Decrease B (remaining number of pixels to scroll) and loop back to 32816 if not zero | ||||||||||||
| 32833 | DEC IX | Decrease IX to point to previous digit in sequence | ||||||||||||
| 32835 | LD A,(IX-2) | Load digit that is two before current one into A... | ||||||||||||
| 32838 | OR A | ...and if this is zero (end marker)... | ||||||||||||
| 32839 | CALL Z,32880 | ...then add ten to IX to wrap from 0 to 9 | ||||||||||||
| 32842 | LD A,(23489) | Load C with x-coordinate of left and right of region to scroll (characters)... | ||||||||||||
| 32845 | LD C,A | ... | ||||||||||||
| 32846 | LD A,(23491) | Load A with y-coordinate of top of region to scroll (pixels)... | ||||||||||||
| 32849 | RRCA | ...divide by 8... | ||||||||||||
| 32850 | RRCA | ... | ||||||||||||
| 32851 | RRCA | ... | ||||||||||||
| 32852 | AND 31 | ...cap at 31 to give y-coordinate in characters, one character above top of the three visible "scrolling" digits... | ||||||||||||
| 32854 | LD B,A | ...and load result into B | ||||||||||||
| 32855 | CALL 54132 | Move virtual cursor (bitmap) to display file address for coordinates x=C, y=B and load address into HL | ||||||||||||
| 32858 | LD A,(IX-2) | Load A with digit two before currently selected one | ||||||||||||
| 32861 | CALL 54097 | Print character in A | ||||||||||||
| 32864 | JP 32714 | Loop back to 32714 for next keyboard / joystick input | ||||||||||||
| Prev: 32672 | Up: Map | Next: 32867 |