![]() |
Routines |
| Prev: 49390 | Up: Map | Next: 49484 |
|
Used by the routine at LookupWord.
The first word below id 85 is the verb. IT and THEM substitute the previous noun. POLISH, SKIN and BRIDGE are rewritten to internal verbs 44, 43 and 49. Later words are the noun, then extra words.
|
||||||||||
|
Count this word. A third word is stored as an extra, not as the noun.
|
||||||||||
| KeepToken | 49412 | PUSH AF | Stash the id on the stack. | |||||||
| 49413 | LD A,(23435) | Increment *WordCount. | ||||||||
| 49416 | INC A | |||||||||
| 49417 | LD (23435),A | |||||||||
| 49420 | CP 3 | Jump to StoreExtra if this is a third word. | ||||||||
| 49422 | JR NC,StoreExtra | |||||||||
| 49424 | CP 32 | Jump to StoreExtra_Overflow if *WordCount is 32. | ||||||||
| 49426 | JR Z,StoreExtra_Overflow | |||||||||
| 49428 | POP AF | Restore the id from the stack. | ||||||||
| 49429 | CP 85 | An id below 85 is the verb. | ||||||||
| 49431 | JR NC,KeepToken_It | |||||||||
| KeepToken_Verb | 49433 | LD (23423),A | Write the id to *Verb. | |||||||
| 49436 | JP ParseWord | Jump to ParseWord to take the next word. | ||||||||
|
IT and THEM reuse the previous noun; other ids become the noun unless they rewrite to a verb.
|
||||||||||
| KeepToken_It | 49439 | CP 128 | IT and THEM (128) reuse *PreviousNoun. | |||||||
| 49441 | JR NZ,KeepToken_Held | |||||||||
| 49443 | LD A,(23453) | |||||||||
| KeepToken_Held | 49446 | LD B,A | Jump to KeepToken_Noun if a verb is already stored. | |||||||
| 49447 | LD A,(23423) | |||||||||
| 49450 | OR A | |||||||||
| 49451 | LD A,B | |||||||||
| 49452 | JR NZ,KeepToken_Noun | |||||||||
| KeepToken_Rewrite | 49454 | CP 175 | Jump to KeepToken_Verb with 44 if the token is POLISH (175). | |||||||
| 49456 | LD A,44 | |||||||||
| 49458 | JR Z,KeepToken_Verb | |||||||||
| 49460 | LD A,B | Jump to KeepToken_Verb with 43 if the token is SKIN (249). | ||||||||
| 49461 | CP 249 | |||||||||
| 49463 | LD A,43 | |||||||||
| 49465 | JR Z,KeepToken_Verb | |||||||||
| 49467 | LD A,B | Jump to KeepToken_Verb with 49 if the token is BRIDGE (134). | ||||||||
| 49468 | CP 134 | |||||||||
| 49470 | LD A,49 | |||||||||
| 49472 | JR Z,KeepToken_Verb | |||||||||
| 49474 | LD A,B | Restore the id when none of those matched. | ||||||||
| KeepToken_Noun | 49475 | LD (23424),A | Write the id to *Noun and *PreviousNoun. | |||||||
| 49478 | LD (23453),A | |||||||||
| 49481 | JP ParseWord | Jump to ParseWord to take the next word. | ||||||||
| Prev: 49390 | Up: Map | Next: 49484 |