![]() |
Routines |
Prev: ACFB | Up: Map | Next: AE36 |
Used by the routine at GameLoop.
|
||||
Reset the screen position to defaults.
|
||||
Handler_UserInput | AD32 | CALL SetDefaultScreenPosition | Call SetDefaultScreenPosition. | |
AD35 | CALL PrintInputPrompt | Call PrintInputPrompt. | ||
AD38 | LD HL,$A7F2 | HL=A7F2. | ||
AD3B | LD B,$00 | B=00. | ||
AD3D | JR Handler_UserInput_1 | Jump to Handler_UserInput_1. | ||
Handler_UserInput_0 | AD3F | INC HL | Increment HL by one. | |
AD40 | INC B | Increment B by one. | ||
Handler_UserInput_1 | AD41 | CALL $ACCF | Call ACCF. | |
AD44 | CALL GetUserInput | Call GetUserInput. | ||
AD47 | CP $0C | Jump to Handler_UserInput_2 if A is not equal to 0C. | ||
AD49 | JR NZ,Handler_UserInput_2 | |||
AD4B | XOR A | A=00. | ||
AD4C | OR B | Jump to Handler_UserInput_1 if A is equal to B. | ||
AD4D | JR Z,Handler_UserInput_1 | |||
AD4F | EX DE,HL | Exchange the DE and HL registers. | ||
Print " ".
|
||||
AD50 | LD HL,$ACC6 | HL=ACC6. | ||
AD53 | CALL PrintString | Call PrintString. | ||
AD56 | EX DE,HL | Exchange the DE and HL registers. | ||
AD57 | DEC HL | Decrease HL by one. | ||
AD58 | DEC B | Decrease B by one. | ||
AD59 | JR Handler_UserInput_1 | Jump to Handler_UserInput_1. | ||
Handler_UserInput_2 | AD5B | LD C,A | Jump to Handler_UserInput_3 if C is equal to 0D. | |
AD5C | CP $0D | |||
AD5E | JR Z,Handler_UserInput_3 | |||
AD60 | CP $20 | Jump to Handler_UserInput_1 if C is less than 20. | ||
AD62 | JR C,Handler_UserInput_1 | |||
AD64 | CP $80 | Jump to Handler_UserInput_1 if C is greater than or equal to 80. | ||
AD66 | JR NC,Handler_UserInput_1 | |||
AD68 | LD A,B | Jump to Handler_UserInput_1 if B is equal to 31. | ||
AD69 | CP $31 | |||
AD6B | JR Z,Handler_UserInput_1 | |||
Handler_UserInput_3 | AD6D | LD A,C | Write C to *HL. | |
AD6E | LD (HL),A | |||
AD6F | CALL $ACE6 | Call ACE6. | ||
AD72 | LD A,C | Jump to Handler_UserInput_0 if C is not equal to 0D. | ||
AD73 | CP $0D | |||
AD75 | JR NZ,Handler_UserInput_0 | |||
AD77 | LD HL,$A824 | HL=UserInput_Token_1. | ||
AD7A | LD B,$0A | B=0A. | ||
Handler_UserInput_4 | AD7C | LD (HL),$FF | Write FF to *HL. | |
AD7E | INC HL | Increment HL by one. | ||
AD7F | DJNZ Handler_UserInput_4 | Decrease counter by one and loop back to Handler_UserInput_4 until counter is zero. | ||
AD81 | LD HL,$A7F2 | HL=A7F2. | ||
AD84 | LD IX,$A824 | IX=UserInput_Token_1. | ||
AD88 | LD C,$0A | C=0A. | ||
AD8A | JR Handler_UserInput_9 | Jump to Handler_UserInput_9. | ||
Print "I don't understand.".
|
||||
Handler_UserInput_5 | AD8C | LD HL,$A84F | HL=Messaging_IDontUnderstand. | |
AD8F | CALL PrintStringAndNewline | Call PrintStringAndNewline. | ||
AD92 | JP Handler_UserInput | Jump to Handler_UserInput. | ||
Handler_UserInput_6 | AD95 | PUSH HL | Stash HL, DE and BC on the stack. | |
AD96 | PUSH DE | |||
AD97 | PUSH BC | |||
AD98 | LD HL,($ACC2) | HL=*ACC2. | ||
AD9B | LD DE,$A82F | DE=A82F. | ||
AD9E | LD BC,$0004 | BC=0004. | ||
ADA1 | LD A,($ACC4) | Jump to Handler_UserInput_7 if *ACC4 is greater than or equal to C. | ||
ADA4 | CP C | |||
ADA5 | JR NC,Handler_UserInput_7 | |||
ADA7 | LD C,A | C=A. | ||
Handler_UserInput_7 | ADA8 | LDIR | LDIR. | |
ADAA | POP BC | Restore BC, DE and HL from the stack. | ||
ADAB | POP DE | |||
ADAC | POP HL | |||
ADAD | PUSH HL | Stash HL on the stack. | ||
ADAE | LD HL,($A7C6) | HL=*A7C6. | ||
ADB1 | PUSH HL | Stash HL on the stack. | ||
ADB2 | LD HL,$A667 | Write A667 to *A7C6. | ||
ADB5 | LD ($A7C6),HL | |||
ADB8 | CALL $ACFB | Call ACFB. | ||
ADBB | POP HL | Restore HL from the stack. | ||
ADBC | LD ($A7C6),HL | Write HL to *A7C6. | ||
ADBF | POP HL | Restore HL from the stack. | ||
ADC0 | JR C,Handler_UserInput_9 | Jump to Handler_UserInput_9 if A is less than C. | ||
ADC2 | CALL $ACFB | Call ACFB. | ||
ADC5 | JR C,Handler_UserInput_8 | Jump to Handler_UserInput_8 if A is less than C. | ||
Print "I don't know the word:-".
|
||||
ADC7 | LD HL,$A863 | HL=Messaging_IDontKnowTheWord. | ||
ADCA | CALL PrintStringAndNewline | Call PrintStringAndNewline. | ||
Print a double quote character: "
" ".
|
||||
ADCD | LD A,$22 | Call PrintCharacter with ASCII 22. | ||
ADCF | CALL PrintCharacter | |||
ADD2 | LD HL,($ACC4) | HL=*ACC4. | ||
ADD5 | LD DE,($ACC2) | DE=*ACC2. | ||
ADD9 | ADD HL,DE | HL+=DE. | ||
ADDA | LD (HL),$FF | Write FF to *HL. | ||
ADDC | EX DE,HL | Exchange the DE and HL registers. | ||
ADDD | CALL PrintString | Call PrintString. | ||
Print a double quote character: "
" ".
|
||||
ADE0 | LD A,$22 | Call PrintCharacter with ASCII 22. | ||
ADE2 | CALL PrintCharacter | |||
Print ".".
|
||||
ADE5 | LD HL,$AA15 | HL=Messaging_FullStop. | ||
ADE8 | CALL PrintStringAndNewline | Call PrintStringAndNewline. | ||
ADEB | JP Handler_UserInput | Jump to Handler_UserInput. | ||
Handler_UserInput_8 | ADEE | LD (IX+$00),A | Write A to *IX+00. | |
ADF1 | INC IX | Increment IX by one. | ||
ADF3 | DEC C | Decrease C by one. | ||
ADF4 | JR Z,Handler_UserInput_16 | Jump to Handler_UserInput_16 if C is equal to C. | ||
Handler_UserInput_9 | ADF6 | PUSH HL | Stash HL and BC on the stack. | |
ADF7 | PUSH BC | |||
ADF8 | LD HL,$A82F | HL=A82F. | ||
ADFB | LD B,$04 | B=04. | ||
Handler_UserInput_10 | ADFD | LD (HL),$20 | Write 20 to *HL. | |
ADFF | INC HL | Increment HL by one. | ||
AE00 | DJNZ Handler_UserInput_10 | Decrease counter by one and loop back to Handler_UserInput_10 until counter is zero. | ||
AE02 | POP BC | Restore BC and HL from the stack. | ||
AE03 | POP HL | |||
AE04 | PUSH DE | Stash DE on the stack. | ||
AE05 | JR Handler_UserInput_12 | Jump to Handler_UserInput_12. | ||
Handler_UserInput_11 | AE07 | INC HL | Increment HL by one. | |
Handler_UserInput_12 | AE08 | LD A,(HL) | Jump to Handler_UserInput_15 if *HL is equal to 0D. | |
AE09 | CP $0D | |||
AE0B | JR Z,Handler_UserInput_15 | |||
AE0D | CALL $ACD8 | Call ACD8. | ||
AE10 | JR Z,Handler_UserInput_11 | Jump to Handler_UserInput_11 if A is equal to 0D. | ||
AE12 | LD ($ACC2),HL | Write HL to *ACC2. | ||
AE15 | LD DE,$0000 | DE=0000. | ||
Handler_UserInput_13 | AE18 | INC HL | Increment HL by one. | |
AE19 | INC DE | Increment DE by one. | ||
AE1A | LD A,(HL) | Jump to Handler_UserInput_14 if *HL is equal to 0D. | ||
AE1B | CP $0D | |||
AE1D | JR Z,Handler_UserInput_14 | |||
AE1F | CALL $ACD8 | Call ACD8. | ||
AE22 | JR NZ,Handler_UserInput_13 | Jump to Handler_UserInput_13 if A is not equal to 0D. | ||
Handler_UserInput_14 | AE24 | LD ($ACC4),DE | Write DE to *ACC4. | |
AE28 | SCF | Set the carry flag. | ||
Handler_UserInput_15 | AE29 | POP DE | Restore DE from the stack. | |
AE2A | JP C,Handler_UserInput_6 | Jump to Handler_UserInput_6 if A is less than 0D. | ||
Handler_UserInput_16 | AE2D | LD A,($A824) | Jump to Handler_UserInput_5 if *UserInput_Token_1 is equal to FF. | |
AE30 | CP $FF | |||
AE32 | JP Z,Handler_UserInput_5 | |||
AE35 | RET | Return. | ||
View the equivalent code in The Jewels Of Babylon.
|
Prev: ACFB | Up: Map | Next: AE36 |