code:
;XA
LINK 800
LINK 801
; FIND GHAST'S ID
GRAB 220
COPY M X
MARK FINDPERSON
SEEK 1
TEST X = F
FJMP FINDPERSON
SEEK -2
COPY F X
COPY X M
REPL GHASTID
; FIND MOSS TOO
SEEK -9999
COPY M X
JUMP FINDPERSON
MARK GHASTID
MODE
GRAB 221
REPL LOCALCTRL
MARK COLLECT_DOLLARS
TEST F = X
FJMP WRONGACCOUNT
SEEK 1
ADDI F 1 M
SEEK 1
TEST EOF
FJMP COLLECT_DOLLARS
MARK WRONGACCOUNT
SEEK 3
TEST EOF
FJMP COLLECT_DOLLARS
COPY 0 M
SEEK -9999
COPY 1 M
MARK COLLECT_CENTS
TEST F = X
FJMP WRONGACCOUNT_CT
SEEK 2
ADDI F 1 M ; HANDLE 0
TEST EOF
FJMP COLLECT_CENTS
MARK WRONGACCOUNT_CT
SEEK 3
TEST EOF
FJMP COLLECT_CENTS
COPY 0 M
MODE
SEEK -9999
COPY M X ; OTHER ID
MODE
COPY X M
DIVI T X T
FJMP COLLECT_DOLLARS
MARK LOCALCTRL
MAKE
COPY 0 X
MARK ADDAMOUNT
COPY M T
FJMP ADDAMOUNTDONE
SUBI T 1 T
ADDI T X X
JUMP ADDAMOUNT
MARK ADDAMOUNTDONE
COPY X F ; DOLLARS IN F
COPY 0 X
TEST M = 0
FJMP ADDAMOUNT
SEEK -9999
COPY F X
COPY F T
ADDI F X X
ADDI F T T
SWIZ T 0043 F
SWIZ T 0021 T
SEEK -1
ADDI F X X
KILL
SUBI 0 T F
SUBI 0 X X
MODE
COPY M T
COPY M F
MARK AGAIN
SEEK -1
ADDI F X X
SUBI T 1 T
TJMP AGAIN
COPY X F
SEEK -3
COPY F X
COPY M T
SEEK 9999
COPY M F
MARK AGAIN2
SEEK -1
ADDI F X X
SUBI T 1 T
TJMP AGAIN2
SEEK -2
SWIZ X 0043 T
ADDI F T T
SWIZ X 0021 X
; NEGATIVE CENTS
COPY T F
TEST X < 0
FJMP SKIP
ADDI 100 X X
SEEK -1
SUBI F 1 T
JUMP COMPLETE
MARK DATE
LINK -1
LINK 804
NOOP
COPY #DATE M
COPY X M
MARK SKIP
SEEK -1
COPY F T
MARK COMPLETE
WIPE
GRAB 220
SEEK 9999
SEEK -2
REPL DATE
ADDI F 1 X
SEEK 9999
COPY X F
COPY M F
DROP
GRAB 221
SEEK 9999
COPY X F
COPY M F
COPY T F
COPY M F
;XB
GRAB 300
COPY F X
COPY F T
REPL PAYROLL
COPY X M
VOID M
COPY T M
COPY M X
COPY X M
COPY 0 M
MODE
COPY 0 M
MARK OTHER
GRAB 231
COPY M X
COPY 1 M
COPY T M
REPL CTRL
COPY 8 T
MARK WT
SUBI T 1 T
TJMP WT
MARK FIND
TEST F = X
SEEK 3
FJMP FIND
SEEK -2
COPY F M
COPY F M
COPY M X
COPY X T
TJMP FIND
; COUNT
SEEK -9999
COPY M X
MARK COUNTPAYMENTS
COPY 1 M
SEEK X
TEST EOF
FJMP COUNTPAYMENTS
COPY 0 M
MARK PAYROLL
MODE
LINK 800
LINK 802
GRAB 230
REPL OTHER
MARK FINDPERSON
SEEK 1
TEST X = F
FJMP FINDPERSON
SEEK -2
COPY F M
; FIND MOSS TOO
SEEK -9999
DIVI 1 M T
COPY M X
JUMP FINDPERSON
MARK CTRL
COPY M X
COPY 0 M
MAKE
COPY M F
COPY M F
COPY X M
COPY M F
COPY M F
COPY 0 M
SEEK -9999
COPY F X
COPY F T
ADDI F X X
ADDI F T T
SWIZ T 0043 F
SWIZ T 0021 T
SEEK -1
ADDI F X X
WIPE
MAKE
COPY X F
COPY T F
LINK -1
DROP
LINK 802
GRAB 230
COPY 0 X
MARK COUNT
ADDI X 1 X
SEEK 2
TEST EOF
FJMP COUNT
MULI X 4 M
DROP
COPY 0 X
LINK -1
GRAB 402
LINK 802
MARK MORE
COPY M T
ADDI X T X
TJMP MORE
LINK -1
LINK -1
VOID M
MODE
COPY X M
COPY F M
COPY X M
COPY F M
WIPE
GRAB 300
SEEK 2
COPY F M