text
stringlengths
0
99.6k
The finished code is located in the cassette buffer at decimal 828.
The object code is only 98 bytes long. The cassette buffer can hold up
to 192 bytes. This code is special in that it is "relocatable", ie.,
it can run at any address with out being modified.
Once the machine code was written and tested, then it was converted it
to data statements and added it to the BASIC program. This was done
with a program called "make data lines" and then the data file
generated was appended to the BASIC file with Tiny Aid. The completed
file was re-numbered with Tiny Aid to give it a finishing touch.
A side by side listing of the Machine Language portion follows. Hope
you enjoy this and let me know if you have any questions.
<<<<<...GAIL...>>>>>
LISTING FROM MERLIN ASSEMBLER
Program by Gail Cox
1 AUX = $8B
2 READST = $FFB7
3 CHKIN = $FFC6
4 CHKOUT = $FFC9
5 CLRCHN = $FFCC
6 CHROUT = $FFD2
7 GETIN = $FFE4
8 *
9 ORG 828
033C: A0 00 10 START LDY #$00
033E: 84 8B 11 STY AUX
0340: A9 20 12 LDA #$20
0342: 85 8C 13 STA AUX+1
0344: A2 08 14 LDX #$08
0346: 20 C6 FF 15 JSR CHKIN
0349: 20 E4 FF 16 MAIN JSR GETIN
034C: C9 0A 17 CMP #$0A ;no linefeed
034E: F0 F9 18 BEQ MAIN
0350: C9 41 19 CMP #'a' ;$41
0352: 90 13 20 BCC OK
MACHINE CODE PROGRAMMING EXAMPLE page 4
0354: C9 5B 21 CMP #'z'+1 ;$7b
0356: B0 04 22 BCS CKMOR
0358: 09 80 23 ORA #$80
035A: D0 0B 24 BNE OK
035C: C9 61 25 CKMOR CMP #'A' ;$61
035E: 90 07 26 BCC OK
0360: C9 7B 27 CMP #'Z'+1 ;$7b
0362: B0 03 28 BCS OK
0364: 38 29 SEC
0365: E9 20 30 SBC #$20
0367: 91 8B 31 OK STA (AUX),Y
0369: C8 32 INY
036A: D0 02 33 BNE CKST
036C: E6 8C 34 INC AUX+1
036E: 20 B7 FF 35 CKST JSR READST
0371: 29 40 36 AND #$40
0373: F0 D4 37 BEQ MAIN
0375: A9 00 38 LDA #$00
0377: 91 8B 39 STA (AUX),Y
0379: 20 CC FF 40 JSR CLRCHN
037C: 60 41 RTS
037D: A9 00 42 WRITE LDA #$00
037F: 85 8B 43 STA AUX
0381: A9 20 44 LDA #$20
0383: 85 8C 45 STA AUX+1
0385: A2 08 46 LDX #$08
0387: 20 C9 FF 47 JSR CHKOUT
038A: A0 00 48 LDY #$00
038C: B1 8B 49 WL LDA (AUX),Y
038E: F0 0A 50 BEQ FINISH
0390: 20 D2 FF 51 JSR CHROUT
0393: C8 52 INY
0394: D0 F6 53 BNE WL
0396: E6 8C 54 INC AUX+1
0398: D0 F2 55 BNE WL
039A: 20 CC FF 56 FINISH JSR CLRCHN
039D: 60 57 RTS
--End assembly, 98 bytes, Errors: 0
#: 23989 S15/GEOS Programming
26-Jun-90 21:41:28
Sb: #23981-#Convert-Geos
Fm: Ed Flinn 76703,4032
To: Will Carroll 71507,656 (X)