Prev: 44283 Up: Map Next: 44598
44338: Handler: User Input
Used by the routine at GameLoop.
Reset the screen position to defaults.
Handler_UserInput 44338 CALL SetDefaultScreenPosition Call SetDefaultScreenPosition.
44341 CALL PrintInputPrompt Call PrintInputPrompt.
44344 LD HL,42994 HL=42994.
44347 LD B,0 B=0.
44349 JR Handler_UserInput_1 Jump to Handler_UserInput_1.
Handler_UserInput_0 44351 INC HL Increment HL by one.
44352 INC B Increment B by one.
Handler_UserInput_1 44353 CALL 44239 Call 44239.
44356 CALL GetUserInput Call GetUserInput.
44359 CP 12 Jump to Handler_UserInput_2 if A is not equal to 12.
44361 JR NZ,Handler_UserInput_2
44363 XOR A A=0.
44364 OR B Jump to Handler_UserInput_1 if A is equal to B.
44365 JR Z,Handler_UserInput_1
44367 EX DE,HL Exchange the DE and HL registers.
Print "  ".
44368 LD HL,44230 HL=44230.
44371 CALL PrintString Call PrintString.
44374 EX DE,HL Exchange the DE and HL registers.
44375 DEC HL Decrease HL by one.
44376 DEC B Decrease B by one.
44377 JR Handler_UserInput_1 Jump to Handler_UserInput_1.
Handler_UserInput_2 44379 LD C,A Jump to Handler_UserInput_3 if C is equal to 13.
44380 CP 13
44382 JR Z,Handler_UserInput_3
44384 CP 32 Jump to Handler_UserInput_1 if C is less than 32.
44386 JR C,Handler_UserInput_1
44388 CP 128 Jump to Handler_UserInput_1 if C is greater than or equal to 128.
44390 JR NC,Handler_UserInput_1
44392 LD A,B Jump to Handler_UserInput_1 if B is equal to 49.
44393 CP 49
44395 JR Z,Handler_UserInput_1
Handler_UserInput_3 44397 LD A,C Write C to *HL.
44398 LD (HL),A
44399 CALL 44262 Call 44262.
44402 LD A,C Jump to Handler_UserInput_0 if C is not equal to 13.
44403 CP 13
44405 JR NZ,Handler_UserInput_0
44407 LD HL,43044 HL=UserInput_Token_1.
44410 LD B,10 B=10.
Handler_UserInput_4 44412 LD (HL),255 Write 255 to *HL.
44414 INC HL Increment HL by one.
44415 DJNZ Handler_UserInput_4 Decrease counter by one and loop back to Handler_UserInput_4 until counter is zero.
44417 LD HL,42994 HL=42994.
44420 LD IX,43044 IX=UserInput_Token_1.
44424 LD C,10 C=10.
44426 JR Handler_UserInput_9 Jump to Handler_UserInput_9.
Print "I don't understand.".
Handler_UserInput_5 44428 LD HL,43087 HL=Messaging_IDontUnderstand.
44431 CALL PrintStringAndNewline Call PrintStringAndNewline.
44434 JP Handler_UserInput Jump to Handler_UserInput.
Handler_UserInput_6 44437 PUSH HL Stash HL, DE and BC on the stack.
44438 PUSH DE
44439 PUSH BC
44440 LD HL,(44226) HL=*44226.
44443 LD DE,43055 DE=43055.
44446 LD BC,4 BC=0004.
44449 LD A,(44228) Jump to Handler_UserInput_7 if *44228 is greater than or equal to C.
44452 CP C
44453 JR NC,Handler_UserInput_7
44455 LD C,A C=A.
Handler_UserInput_7 44456 LDIR LDIR.
44458 POP BC Restore BC, DE and HL from the stack.
44459 POP DE
44460 POP HL
44461 PUSH HL Stash HL on the stack.
44462 LD HL,(42950) HL=*42950.
44465 PUSH HL Stash HL on the stack.
44466 LD HL,42599 Write 42599 to *42950.
44469 LD (42950),HL
44472 CALL 44283 Call 44283.
44475 POP HL Restore HL from the stack.
44476 LD (42950),HL Write HL to *42950.
44479 POP HL Restore HL from the stack.
44480 JR C,Handler_UserInput_9 Jump to Handler_UserInput_9 if A is less than C.
44482 CALL 44283 Call 44283.
44485 JR C,Handler_UserInput_8 Jump to Handler_UserInput_8 if A is less than C.
Print "I don't know the word:-".
44487 LD HL,43107 HL=Messaging_IDontKnowTheWord.
44490 CALL PrintStringAndNewline Call PrintStringAndNewline.
Print a double quote character: """.
44493 LD A,34 Call PrintCharacter with ASCII 34.
44495 CALL PrintCharacter
44498 LD HL,(44228) HL=*44228.
44501 LD DE,(44226) DE=*44226.
44505 ADD HL,DE HL+=DE.
44506 LD (HL),255 Write 255 to *HL.
44508 EX DE,HL Exchange the DE and HL registers.
44509 CALL PrintString Call PrintString.
Print a double quote character: """.
44512 LD A,34 Call PrintCharacter with ASCII 34.
44514 CALL PrintCharacter
Print ".".
44517 LD HL,43541 HL=Messaging_FullStop.
44520 CALL PrintStringAndNewline Call PrintStringAndNewline.
44523 JP Handler_UserInput Jump to Handler_UserInput.
Handler_UserInput_8 44526 LD (IX+0),A Write A to *IX+0.
44529 INC IX Increment IX by one.
44531 DEC C Decrease C by one.
44532 JR Z,Handler_UserInput_16 Jump to Handler_UserInput_16 if C is equal to C.
Handler_UserInput_9 44534 PUSH HL Stash HL and BC on the stack.
44535 PUSH BC
44536 LD HL,43055 HL=43055.
44539 LD B,4 B=4.
Handler_UserInput_10 44541 LD (HL),32 Write 32 to *HL.
44543 INC HL Increment HL by one.
44544 DJNZ Handler_UserInput_10 Decrease counter by one and loop back to Handler_UserInput_10 until counter is zero.
44546 POP BC Restore BC and HL from the stack.
44547 POP HL
44548 PUSH DE Stash DE on the stack.
44549 JR Handler_UserInput_12 Jump to Handler_UserInput_12.
Handler_UserInput_11 44551 INC HL Increment HL by one.
Handler_UserInput_12 44552 LD A,(HL) Jump to Handler_UserInput_15 if *HL is equal to 13.
44553 CP 13
44555 JR Z,Handler_UserInput_15
44557 CALL 44248 Call 44248.
44560 JR Z,Handler_UserInput_11 Jump to Handler_UserInput_11 if A is equal to 13.
44562 LD (44226),HL Write HL to *44226.
44565 LD DE,0 DE=0000.
Handler_UserInput_13 44568 INC HL Increment HL by one.
44569 INC DE Increment DE by one.
44570 LD A,(HL) Jump to Handler_UserInput_14 if *HL is equal to 13.
44571 CP 13
44573 JR Z,Handler_UserInput_14
44575 CALL 44248 Call 44248.
44578 JR NZ,Handler_UserInput_13 Jump to Handler_UserInput_13 if A is not equal to 13.
Handler_UserInput_14 44580 LD (44228),DE Write DE to *44228.
44584 SCF Set the carry flag.
Handler_UserInput_15 44585 POP DE Restore DE from the stack.
44586 JP C,Handler_UserInput_6 Jump to Handler_UserInput_6 if A is less than 13.
Handler_UserInput_16 44589 LD A,(43044) Jump to Handler_UserInput_5 if *UserInput_Token_1 is equal to 255.
44592 CP 255
44594 JP Z,Handler_UserInput_5
44597 RET Return.
Prev: 44283 Up: Map Next: 44598