Prev: 73B5 Up: Map Next: 73F1
73CB: Add to the lines total and print it
Used by the routines at 5F1C, 7414 and F5BE. Adds to the lines total and prints the new total. Also sets MR WACKER on his way to expel ERIC if the new total is 10000 lines or more.
Input
A Number of lines to add/10
73CB PUSH DE
73CC PUSH HL
73CD LD E,A DE=number of lines to add
73CE LD D,$00
73D0 LD HL,($7FE7) HL=current lines total (divided by 10)
73D3 LD BC,$FC18 BC=-1000
73D6 ADD HL,BC Does ERIC have less than 10000 lines?
73D7 JR NC,$73DC Jump if so
73D9 ADD HL,DE Add lines to ERIC's total
73DA JR $73E5
73DC ADD HL,DE Add lines to ERIC's total
73DD JR NC,$73E5 Jump if ERIC still has less than 10000 lines
73DF PUSH HL
73E0 CALL $F532 Set MR WACKER on his way to expel ERIC
73E3 AND A Clear the carry flag ready for subtraction
73E4 POP HL
73E5 SBC HL,BC Now HL=new lines total
73E7 LD ($7FE7),HL Store the new lines total at 7FE7
73EA EX DE,HL Transfer the new lines total to DE
73EB LD HL,$51C4 HL=display file address for printing the lines total
73EE JP $73C5 Print the new lines total
Prev: 73B5 Up: Map Next: 73F1