![]() |
Routines |
| Prev: DCA7 | Up: Map | Next: DE13 |
|
Used by the routine at DB27.
|
||||
| DD1F | LD HL,$DCF4 | Reset charcode for password | ||
| DD22 | LD DE,$DCF5 | |||
| DD25 | LD BC,$0010 | |||
| DD28 | LD (HL),$20 | |||
| DD2A | LDIR | |||
| DD2C | LD HL,$DCF4 | Set cursor graphic into windows for insert password code | ||
| DD2F | LD (HL),$20 | |||
| DD31 | INC HL | |||
| DD32 | LD (HL),$3F | |||
| DD34 | INC HL | |||
| DD35 | LD (HL),$00 | |||
| DD37 | LD IX,$DCC7 | Point IX to the text definition data for input code windows | ||
| DD3B | LD B,$03 | Set B to the number of lines to draw | ||
| DD3D | CALL $A2E6 | Draws windows for input code | ||
| DD40 | XOR A | Reset the number of digits inputs in password code | ||
| DD41 | LD ($A260),A | |||
| DD44 | LD HL,$DCF5 | Point A238 to the first character of the password code | ||
| DD47 | LD ($A238),HL | |||
| DD4A | JR $DD77 | Jump to check for key pressed | ||
| DD4C | LD A,($A260) | Set A the number of digits entered | ||
| DD4F | CP $10 | 16 digits entered ? | ||
| DD51 | JP Z,$DD77 | Jump to check for key pressed if so | ||
| DD54 | LD A,($A236) | Set A the charcode of the key pressed | ||
| DD57 | LD HL,($A238) | Set charcode into address for text defintion windows | ||
| DD5A | LD (HL),A | |||
| DD5B | INC HL | Increment address into text definition | ||
| DD5C | LD ($A238),HL | |||
| DD5F | LD HL,$A260 | Increment number of entered digits | ||
| DD62 | INC (HL) | |||
|
Reset cursor and draw password
|
||||
| DD63 | LD HL,($A238) | Reset cursor position | ||
| DD66 | LD (HL),$3F | |||
| DD68 | INC HL | |||
| DD69 | LD (HL),$20 | |||
| DD6B | INC HL | |||
| DD6C | LD (HL),$00 | |||
| DD6E | LD IX,$DCF1 | Set IY to the text definition data for the entered password | ||
| DD72 | LD B,$01 | Set B the number of lines to draw | ||
| DD74 | CALL $A487 | Print the password | ||
|
Check for key pressed
|
||||
| DD77 | CALL $DD9B | Wait for a keypress and set into A the charcode for the key | ||
| DD7A | CP $2D | is - (CAPS key)? | ||
| DD7C | JR Z,$DD87 | Jump to erase a digit | ||
| DD7E | CP $2B | is + (ENTER key)? | ||
| DD80 | JR Z,$DD9A | Jump to check the code input | ||
| DD82 | LD ($A236),A | Set A236 the charcode for the key pressed | ||
| DD85 | JR $DD4C | Jump to draw the charcode | ||
|
Erase a digit
|
||||
| DD87 | LD A,($A260) | Jump to reset cursor if no digit entered | ||
| DD8A | OR A | |||
| DD8B | JR Z,$DD63 | |||
| DD8D | LD HL,($A238) | Decrement pointer to the address for the input password | ||
| DD90 | DEC HL | |||
| DD91 | LD ($A238),HL | |||
| DD94 | LD HL,$A260 | Decrement the number of digit entered for the password | ||
| DD97 | DEC (HL) | |||
| DD98 | JR $DD63 | Jump to reset cursor | ||
| DD9A | RET | |||
| DD9B | PUSH IY | Save IY | ||
| DD9D | LD IX,$AE1A | Set IX to point to address of port list for keys read | ||
| DDA1 | LD IY,$AE2A | Set IY to point to the list of charcodes for the keys read | ||
| DDA5 | LD B,$08 | Set B the number of ports to read | ||
| DDA7 | PUSH BC | Save B | ||
| DDA8 | LD C,(IX+$00) | Set A244 the port to read | ||
| DDAB | LD B,(IX+$01) | |||
| DDAE | LD ($A244),BC | |||
| DDB2 | IN A,(C) | Read keys into A | ||
| DDB4 | LD B,$05 | Read the status for the 5 keys of this port and jump to handle the read if pressed | ||
| DDB6 | LD E,$00 | |||
| DDB8 | LD D,A | |||
| DDB9 | RRCA | |||
| DDBA | JP NC,$DDCF | |||
| DDBD | INC E | |||
| DDBE | DJNZ $DDB9 | |||
|
key not pressed for this port
|
||||
| DDC0 | POP BC | Restore B | ||
| DDC1 | INC IX | Point IX to the next port | ||
| DDC3 | INC IX | |||
| DDC5 | LD DE,$0005 | Point IY to the next list of charcodes of keys | ||
| DDC8 | ADD IY,DE | |||
| DDCA | DJNZ $DDA7 | Jump until all ports read | ||
| DDCC | JP $DD9D | Jump back and continue with the first port | ||
|
handle key pressed
|
||||
| DDCF | POP BC | Restore BC | ||
| DDD0 | PUSH DE | Save DE | ||
| DDD1 | LD C,(IX+$00) | Loop until key not pressed | ||
| DDD4 | LD B,(IX+$01) | |||
| DDD7 | IN A,(C) | |||
| DDD9 | CP D | |||
| DDDA | JP Z,$DDD1 | |||
| DDDD | LD A,E | Computes into A246 the opcode of the corresponent BIT operation to check key presses | ||
| DDDE | SLA A | |||
| DDE0 | SLA A | |||
| DDE2 | SLA A | |||
| DDE4 | LD D,$47 | |||
| DDE6 | ADD A,D | |||
| DDE7 | LD ($A246),A | |||
| DDEA | POP DE | Restore DE | ||
| DDEB | LD D,$00 | Set A to the corresponding charcode for the key pressed | ||
| DDED | ADD IY,DE | |||
| DDEF | LD A,(IY+$00) | |||
| DDF2 | POP IY | Restore IY | ||
| DDF4 | CP $20 | is SPACE charcode ? | ||
| DDF6 | JP Z,$DD9B | Jump back and begin to check for the first port | ||
| DDF9 | CP $48 | is H charcode ? | ||
| DDFB | JP Z,$DD9B | Jump back and begin to check for the first port | ||
| DDFE | LD IY,$DE13 | Compare if key read has been assigned previously. Jump back and begin to check for the first port if is the case | ||
| DE02 | LD B,$05 | |||
| DE04 | CP (IY+$00) | |||
| DE07 | JP Z,$DD9B | |||
| DE0A | INC IY | |||
| DE0C | DJNZ $DE04 | |||
| DE0E | LD IY,$DE13 | Set IY to the base address for assigned keys | ||
| DE12 | RET | |||
| Prev: DCA7 | Up: Map | Next: DE13 |