Prev: 7434 Up: Map Next: 7478
743F: Print the article a noun takes
Used by the routines at PRINT_NOUN and PRINT_NAME.
The top bits of the noun's word reference choose it. Bit 7 marks a proper name, which takes none and is capitalised instead -- except YOU, the word at $07A8, which is left in lower case. Otherwise bits 4 to 6 pick from ARTICLES: THE, A, AN or SOME -- or, in the input window or while an action is being narrated, THE for everything but SOME.
Input
DE The noun's word reference
ARTICLE 743F BIT 7,D A proper name?
7441 JR Z,ARTICLE_1
7443 LD A,E YOU: no capital
7444 LD HL,$07A8
7447 CP L
7448 JR NZ,ARTICLE_0
744A LD A,D
744B AND $0F
744D CP H
744E RET Z
ARTICLE_0 744F LD A,$01 Otherwise the next letter is a capital
7451 LD (CAPITAL_NEXT),A
7454 RET
ARTICLE_1 7455 LD HL,ARTICLES THE, A, AN or SOME -- or THE throughout when narrating
7458 LD A,(INPUT_STYLE)
745B LD E,A
745C LD A,(NARRATING)
745F OR E
7460 JR Z,ARTICLE_2
7462 LD HL,ARTICLES_NARRATING
ARTICLE_2 7465 LD A,D Print the one its bits choose
7466 RRCA
7467 RRCA
7468 RRCA
7469 AND $1E
746B PUSH DE
746C LD E,A
746D LD D,$00
746F ADD HL,DE
7470 LD E,(HL)
7471 INC HL
7472 LD D,(HL)
7473 CALL PRINT_WORD_DE
7476 POP DE
7477 RET
Prev: 7434 Up: Map Next: 7478