![]() |
Routines |
| Prev: 6F30 | Up: Map | Next: 6FBA |
|
Used by the routine at Input_TakeTheNextWord.
Copies one typed word into the dictionary buffer and looks it up.
|
||||
| Input_CopyADictionaryWord | 6F47 | LD DE,$707A | Point DE at the typed word. | |
| 6F4A | LD B,$00 | Start the pass count at zero. | ||
| Input_CopyADictionaryWord_CopyTheNextLetter | 6F4C | LD A,(HL) | Jump to Input_CopyADictionaryWord_CopyTheCount if this character is below 40. | |
| 6F4D | CP $40 | |||
| 6F4F | JR C,Input_CopyADictionaryWord_CopyTheCount | |||
| 6F51 | AND $1F | Store the low five bits of this character in the typed word and step on. | ||
| 6F53 | LD (DE),A | |||
| 6F54 | INC DE | |||
| 6F55 | INC HL | Step to the next byte of the input buffer. | ||
| 6F56 | INC B | Count one more letter of the typed word. | ||
| 6F57 | JR Input_CopyADictionaryWord_CopyTheNextLetter | Jump back to Input_CopyADictionaryWord_CopyTheNextLetter to copy the next letter. | ||
| Input_CopyADictionaryWord_CopyTheCount | 6F59 | LD A,B | Copy the count in B into A. | |
| 6F5A | LD ($708A),A | Update *708A. | ||
| 6F5D | PUSH HL | Read *707A. | ||
| 6F5E | LD HL,($707A) | |||
| 6F61 | LD H,$00 | The dictionary offset's high byte is zero before the index is doubled. | ||
| 6F63 | LD DE,$6000 | Add the token index to the pointer. | ||
| 6F66 | ADD HL,HL | |||
| 6F67 | ADD HL,DE | Add the token index to the typed word. | ||
| 6F68 | LD E,(HL) | Read the low byte of the typed word. | ||
| 6F69 | INC HL | Step to the next byte of the typed word. | ||
| 6F6A | LD D,(HL) | Read the high byte of the typed word. | ||
| 6F6B | LD IX,$6000 | Point IX at the dictionary word and restore the input pointer from the stack. | ||
| 6F6F | ADD IX,DE | |||
| 6F71 | POP HL | |||
|
This entry point is used by the routine at Input_TakeTheNextWord.
|
||||
| Input_CopyADictionaryWord_0 | 6F72 | LD ($B717),IX | Update *B717. | |
|
This entry point is used by the routine at Input_TakeTheNextWord.
|
||||
| Input_CopyADictionaryWord_1 | 6F76 | LD A,(IX+$00) | Read the first byte of the dictionary word. | |
| 6F79 | AND $1F | Keep the first letter (bits 0-4). | ||
| 6F7B | LD B,A | |||
| 6F7C | LD A,($707A) | Read the typed word's first letter at 707A. | ||
| 6F7F | CP B | Return when this dictionary word does not start with the typed word's first letter. | ||
| 6F80 | RET NZ | |||
| 6F81 | PUSH HL | Point HL at the buffer that receives the dictionary word. | ||
| 6F82 | LD HL,$708B | |||
| 6F85 | LD BC,$0000 | Start from a clear pointer. | ||
| Input_CopyADictionaryWord_TestTheLetter | 6F88 | LD A,(IX+$00) | Jump to Input_CopyADictionaryWord_StepTheDictionary if the low five bits of this dictionary byte are zero. | |
| 6F8B | AND $1F | |||
| 6F8D | JR Z,Input_CopyADictionaryWord_StepTheDictionary | |||
| 6F8F | LD (HL),A | Store it in the dictionary word and step on. | ||
| 6F90 | INC HL | |||
| 6F91 | INC B | Count one more letter of the dictionary word. | ||
| Input_CopyADictionaryWord_StepTheDictionary | 6F92 | INC IX | Step to the next dictionary byte and loop back to Input_CopyADictionaryWord_TestTheLetter while bit 7 of that byte is clear. | |
| 6F94 | INC C | |||
| 6F95 | BIT 7,(IX-$01) | |||
| 6F99 | JR Z,Input_CopyADictionaryWord_TestTheLetter | |||
| 6F9B | LD A,C | Jump back to Input_CopyADictionaryWord_TestTheLetter if the letter count in C is 02. | ||
| 6F9C | CP $02 | |||
| 6F9E | JR Z,Input_CopyADictionaryWord_TestTheLetter | |||
| 6FA0 | CP $03 | Jump to Input_CopyADictionaryWord_RestoreThePointer if the letter count is not 03. | ||
| 6FA2 | JR NZ,Input_CopyADictionaryWord_RestoreThePointer | |||
| 6FA4 | BIT 7,(IX-$02) | Jump back to Input_CopyADictionaryWord_TestTheLetter if bit 7 of the earlier dictionary byte is set. | ||
| 6FA8 | JR NZ,Input_CopyADictionaryWord_TestTheLetter | |||
| Input_CopyADictionaryWord_RestoreThePointer | 6FAA | POP HL | Restore the saved pointer from the stack and keep the letter count. | |
| 6FAB | LD A,B | |||
| 6FAC | LD ($709B),A | Update *709B. | ||
| 6FAF | BIT 6,(IX-$01) | Return if bit 6 of this dictionary byte is clear. | ||
| 6FB3 | RET Z | |||
| 6FB4 | INC IX | Step IX past the two flag bytes of this dictionary entry. | ||
| 6FB6 | INC IX | |||
| 6FB8 | XOR A | Return zero. | ||
| 6FB9 | RET | Return. | ||
| Prev: 6F30 | Up: Map | Next: 6FBA |