Go to page of
Similar user manuals
-
Personal Computer
Apple Power Mac G5
120 pages 4.41 mb -
Personal Computer
Apple 5300/100 LC
319 pages 6.8 mb -
Computer Keyboard
Apple IBOOK 073-0581
6 pages 2.93 mb -
Personal Computer
Apple 9500 Series
166 pages 1.8 mb -
Personal Computer
Apple 180C
156 pages 1.04 mb -
Tablet
Apple MD540LL/A
136 pages 13.82 mb -
Computer Accessories
Apple Component AV Cable
16 pages 1.05 mb -
Computer Accessories
Apple G5
112 pages 8.84 mb
A good user manual
The rules should oblige the seller to give the purchaser an operating instrucion of Apple ii, along with an item. The lack of an instruction or false information given to customer shall constitute grounds to apply for a complaint because of nonconformity of goods with the contract. In accordance with the law, a customer can receive an instruction in non-paper form; lately graphic and electronic forms of the manuals, as well as instructional videos have been majorly used. A necessary precondition for this is the unmistakable, legible character of an instruction.
What is an instruction?
The term originates from the Latin word „instructio”, which means organizing. Therefore, in an instruction of Apple ii one could find a process description. An instruction's purpose is to teach, to ease the start-up and an item's use or performance of certain activities. An instruction is a compilation of information about an item/a service, it is a clue.
Unfortunately, only a few customers devote their time to read an instruction of Apple ii. A good user manual introduces us to a number of additional functionalities of the purchased item, and also helps us to avoid the formation of most of the defects.
What should a perfect user manual contain?
First and foremost, an user manual of Apple ii should contain:
- informations concerning technical data of Apple ii
- name of the manufacturer and a year of construction of the Apple ii item
- rules of operation, control and maintenance of the Apple ii item
- safety signs and mark certificates which confirm compatibility with appropriate standards
Why don't we read the manuals?
Usually it results from the lack of time and certainty about functionalities of purchased items. Unfortunately, networking and start-up of Apple ii alone are not enough. An instruction contains a number of clues concerning respective functionalities, safety rules, maintenance methods (what means should be used), eventual defects of Apple ii, and methods of problem resolution. Eventually, when one still can't find the answer to his problems, he will be directed to the Apple service. Lately animated manuals and instructional videos are quite popular among customers. These kinds of user manuals are effective; they assure that a customer will familiarize himself with the whole material, and won't skip complicated, technical information of Apple ii.
Why one should read the manuals?
It is mostly in the manuals where we will find the details concerning construction and possibility of the Apple ii item, and its use of respective accessory, as well as information concerning all the functions and facilities.
After a successful purchase of an item one should find a moment and get to know with every part of an instruction. Currently the manuals are carefully prearranged and translated, so they could be fully understood by its users. The manuals will serve as an informational aid.
Table of contents for the manual
-
Page 1
Apple II Original ROM Information Source http://members.buckeye-express.com/marksm/6502/ 27 June 2004 The 6502 Firmware Page This site is mostly about the firmware -- software in ROM -- that came with the original Apple II, not the II+, IIe, IIc, or IIgs. The original Apple II had 4K of RAM and 8K of ROM. The ROM contains software, such as the Moni[...]
-
Page 2
+------------------------------------------------------------------------ | TOPIC -- Apple II -- Apple II ROM (12 KB binary) +------------------------------------------------------------------------ File ............. "a2rom.bin" Fork ............. DATA Size (bytes) ..... 12,288 (12KB) / $00003000 Created .......... Sunday, December 8, 20[...]
-
Page 3
D/0002E0: 0320D9D0 CAD0E5A5 514A4A4A D0D3E61A [........QJJJ....] D/0002F0: D002E61B A11AD0C9 602090D3 8D240320 [........`....$..] D/000300: AFD34820 9AD36820 2ED0AE23 036020F9 [..H...h....#.`..] D/000310: D24C7DD0 AD25034A 2090D320 75D0209A [.L}..%.J....u...] D/000320: D38A4898 AA20AFD3 A8682064 D1AE2303 [..H......h.d..#.] D/000330: 602090D3 4C10D0[...]
-
Page 4
D/000660: 20DAFDA5 0A208AD6 A501910A 208AD668 [...............h] D/000670: 4CCB02A5 0920DAFD A508208A D6A50220 [L...............] D/000680: 8AD6202D FFA98D4C EDFD20DA FDA9A04C [...-...L.......L] D/000690: EDFD840F 850E208A D6202DFF A500450E [..........-...E.] D/0006A0: 850EA007 460E9023 A9A020ED FDA53DC9 [....F..#......=.] D/0006B0: 50A9C469 0020ED[...]
-
Page 5
D/0009E0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF [................] D/0009F0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF [................] D/000A00: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF [................] D/000A10: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF [................] D/000A20: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF [................] D/000A30: FFFFFFFF FFFFFF[...]
-
Page 6
D/000D60: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF [................] D/000D70: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF [................] D/000D80: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF [................] D/000D90: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF [................] D/000DA0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF [................] D/000DB0: FFFFFFFF FFFFFF[...]
-
Page 7
D/0010E0: 85E41869 A020EDFD 88E0C090 EC200CE0 [...i............] D/0010F0: 68C95DF0 A4C928D0 8AF09E20 18E19550 [h.]...(........P] D/001100: D5789011 A02B4CE0 E32034EE D55090F4 [.x...+L...4..P..] D/001110: 20E4EF95 784C23E8 2034EEF0 E738E901 [....xL#..4...8..] D/001120: 602018E1 955018F5 784C02E1 A014D0D6 [`....P..xL......] D/001130: 2018E1E8 B55085[...]
-
Page 8
D/001460: FA88B038 0A3035B4 5884FFB4 80E810DA [...8.05.X.......] D/001470: F0B3C97E B022CA10 04A00610 299480A4 [...~."......)...] D/001480: FF9458A4 C894A8A4 F194D129 1FA8B997 [..X........)....] D/001490: F10AA8A9 762A85FF D001C8C8 86FDB1FE [....v*..........] D/0014A0: 3084D005 A00E4CE0 E3C903B0 C34AA6C8 [0.....L......J..] D/0014B0: E8BD0002 9[...]
-
Page 9
D/0017E0: CF602015 E7A5CE85 F6A5CF85 F78884F8 [.`..............] D/0017F0: C8A90A85 F484F560 2015E7A5 CEA4CF10 [.......`........] D/001800: F22015E7 B55085DA B57885DB A5CE91DA [.....P...x......] D/001810: C8A5CF4C 07F26068 6824D510 05208EFD [...L..`hh$......] D/001820: 46D560A0 FF84D760 20CDEFF0 07A92585 [F.`....`......%.] D/001830: D68884D4 E860A5[...]
-
Page 10
D/001B60: C5D854D3 D4CFD0D0 C5C4A0C1 D420AAAA [..T.............] D/001B70: AA20A0C5 D2D20DBE B2B535D2 C1CEC745 [..........5....E] D/001B80: C4C94DD3 D4D2A0CF D6C64CDC 0DD2C5D4 [..M.......L.....] D/001B90: D9D0C5A0 CCC9CEC5 8D3F46D9 90034CC3 [.........?F...L.] D/001BA0: E8A6CF9A A6CEA08D D002A099 20C4E386 [................] D/001BB0: CEBA86CF 2066F3[...]
-
Page 11
D/001EE0: 724C61F1 203FF206 CE26CF30 FAB0DCD0 [rLa..?...&.0....] D/001EF0: 04C5CEB0 D6602015 E7B1CE94 9F4C08E7 [.....`.......L..] D/001F00: 2034EEA5 CE85C860 2015E7A5 C891CE60 [.4.....`.......`] D/001F10: 206CEEA5 CE85E6A5 CF85E74C 44E220E4 [.l.........LD...] D/001F20: EE4C34E1 20E4EEB4 78B55069 FEB00188 [.L4.....x.Pi....] D/001F30: 85DA84DB 18[...]
-
Page 12
D/002260: E756504C 36E720C9 EF154F10 0520C9EF [.VPL6.....O.....] D/002270: 354F9550 10ED4CC9 EF2015E7 A4FBA5CE [5O.P..L.........] D/002280: 995F01A5 CF4C66E9 99500188 3051B940 [._...Lf..P..0Q.@] D/002290: 01D550D0 F6B95001 D578D0EF C6FBB941 [..P...P..x.....A] D/0022A0: 01994001 B9510199 5001B9C1 0199C001 [..@..Q..P.......] D/0022B0: B9D10199 D001B9[...]
-
Page 13
D/0025E0: DDB4F9D0 132034F6 DDBAF9F0 0DBDBAF9 [......4.........] D/0025F0: F007C9A4 F003A434 18882644 E003D00D [.......4..&D....] D/002600: 20A7FFA5 3FF001E8 8635A203 88863DCA [....?....5....=.] D/002610: 10C9A544 0A0A0535 C920B006 A635F002 [...D...5.....5..] D/002620: 09808544 8434B900 02C9BBF0 04C98DD0 [...D.4..........] D/002630: 804C5CF5 B9[...]
-
Page 14
D/002960: C8600420 54300D80 04900322 54330D80 [.`..T0....."T3..] D/002970: 04900420 54330D80 04900420 543B0D80 [....T3......T;..] D/002980: 04900022 44330DC8 44001122 44330DC8 [..."D3..D.."D3..] D/002990: 44A90122 44330D80 04900122 44330D80 [D.."D3....."D3..] D/0029A0: 04902631 879A0021 81820000 594D9192 [..&1...!....YM[...]
-
Page 15
D/002CE0: A03288D0 FDAC20C0 A02CCA60 A2084820 [.2.......,.`..H.] D/002CF0: FAFC682A A03ACAD0 F56020FD FC88AD60 [..h*.:...`.....`] D/002D00: C0452F10 F8452F85 2FC08060 A424B128 [.E/..E/./..`.$.(] D/002D10: 48293F09 40912868 6C3800E6 4ED002E6 [H)?.@.(hl8..N...] D/002D20: 4F2C00C0 10F59128 AD00C02C 10C06020 [O,.....(...,..`.] D/002D30: 0CFD202C FC200C[...]
-
Page 16
+------------------------------------------------------------------------ | TOPIC -- Apple II -- Memory map of the Apple II ROMs +------------------------------------------------------------------------ Memory map of the Apple II ROMs * $F800-$FFFF Monitor. Handles screen I/O and keyboard input. Also has a disassembler, memory dump, memory move, me[...]
-
Page 17
+------------------------------------------------------------------------ | TOPIC -- Apple II -- Summary of Monitor Commands +------------------------------------------------------------------------ Summary of Apple II Monitor Commands Examining Memory. * {adrs} Examines the value contained in one location. * {adrs1}.{adrs2} Displays the values con[...]
-
Page 18
* {adrs}T Step infinitely. The TRACE command stops only when it executes a BRK instruction or when you press RESET. (T=trace) * Contrl-E Displays the contents of the 6502's registers. (E=examine) * I Set Inverse display mode. * N Set Normal display mode. Also useful as a delimiter for putting multiple commands on one line. * Control-B Enter th[...]
-
Page 19
+------------------------------------------------------------------------ | TOPIC -- Apple II -- Red Book Monitor listing +------------------------------------------------------------------------ 1 *************************** 2 * * 3 * APPLE II * 4 * SYSTEM MONITOR * 5 * * 6 * COPYRIGHT 1977 BY * 7 * APPLE COMPUTER, INC. * 8 * * 9 * ALL RIGHTS RESE[...]
-
Page 20
57 A2L EQU $3E 58 A2H EQU $3F 59 A3L EQU $40 60 A3H EQU $41 61 A4L EQU $42 62 A4H EQU $43 63 A5L EQU $44 64 A5H EQU $45 65 ACC EQU $45 66 XREG EQU $46 67 YREG EQU $47 68 STATUS EQU $48 69 SPNT EQU $49 70 RNDL EQU $4E 71 RNDH EQU $4F 72 ACL EQU $50 73 ACH EQU $51 74 XTNDL EQU $52 75 XTNDH EQU $53 76 AUXL EQU $54 77 AUXH EQU $55 78 PICK EQU $95 79 IN[...]
-
Page 21
F820: C8 119 INY ; NO, INC INDEX (X-COORD) F821: 20 0E F8 120 JSR PLOT1 ;PLOT NEXT SQUARE F824: 90 F6 121 BCC HLINE1 ;ALWAYS TAKEN F826: 69 01 122 VLINEZ ADC #$01 ;NEXT Y-COORD F828: 48 123 VLINE PHA ; SAVE ON STACK F829: 20 00 F8 124 JSR PLOT ; PLOT SQUARE F82C: 68 125 PLA F82D: C5 2D 126 CMP V2 ;DONE? F82F: 90 F5 127 BCC VLINEZ ; NO, LOOP F831: 6[...]
-
Page 22
F884: A4 3B 181 LDY PCH F886: 20 96 FD 182 JSR PRYX2 F889: 20 48 F9 183 JSR PRBLNK ;FOLLOWED BY A BLANK F88C: A1 3A 184 LDA (PCL,X) ;GET OP CODE F88E: A8 185 INSDS2 TAY F88F: 4A 186 LSR ;EVEN/ODD TEST F890: 90 09 187 BCC IEVEN F892: 6A 188 ROR ;BIT 1 TEST F893: B0 10 189 BCS ERR ;XXXXXX11 INVALID OP F895: C9 A2 190 CMP #$A2 F897: F0 0C 191 BEQ ERR [...]
-
Page 23
F8F5: A9 00 243 PRMN1 LDA #$00 F8F7: A0 05 244 LDY #$05 F8F9: 06 2D 245 PRMN2 ASL RMNEM ;SHIFT 5 BITS OF F8FB: 26 2C 246 ROL LMNEM ; CHARACTER INTO A F8FD: 2A 247 ROL ; (CLEARS CARRY) F8FE: 88 248 DEY F8FF: D0 F8 249 BNE PRMN2 F901: 69 BF 250 ADC #$BF ;ADD "?" OFFSET F903: 20 ED FD 251 JSR COUT ;OUTPUT A CHAR OF MNEM F906: CA 252 DEX F907[...]
-
Page 24
F962: 04 20 54 305 FMT1 DFB $04,$20,$54,$30,$0D F965: 30 0D F967: 80 04 90 306 DFB $80,$04,$90,$03,$22 F96A: 03 22 F96C: 54 33 0D 307 DFB $54,$33,$0D,$80,$04 F96F: 80 04 F971: 90 04 20 308 DFB $90,$04,$20,$54,$33 F974: 54 33 F976: 0D 80 04 309 DFB $0D,$80,$04,$90,$04 F979: 90 04 F97B: 20 54 3B 310 DFB $20,$54,$3B,$0D,$80 F97E: 0D 80 F980: 04 90 00 [...]
-
Page 25
F9D8: 24 53 1B 347 DFB $24,$53,$1B,$23,$24,$53 F9DB: 23 24 53 F9DE: 19 A1 348 DFB $19,$A1 ;(A) FORMAT ABOVE F9E0: 00 1A 5B 349 DFB $00,$1A,$5B,$5B,$A5,$69 F9E3: 5B A5 69 F9E6: 24 24 350 DFB $24,$24 ;(B) FORMAT F9E8: AE AE A8 351 DFB $AE,$AE,$A8,$AD,$29,$00 F9EB: AD 29 00 F9EE: 7C 00 352 DFB $7C,$00 ;(C) FORMAT F9F0: 15 9C 6D 353 DFB $15,$9C,$6D,$9C[...]
-
Page 26
FA70: 29 1F 395 AND #$1F FA72: 49 14 396 EOR #$14 FA74: C9 04 397 CMP #$04 ;COPY USER INST TO XEQ AREA FA76: F0 02 398 BEQ XQ2 ; WITH TRAILING NOPS FA78: B1 3A 399 XQ1 LDA (PCL),Y ;CHANGE REL BRANCH FA7A: 99 3C 00 400 XQ2 STA XQT,Y ; DISP TO 4 FOR FA7D: 88 401 DEY ; JMP TO BRANCH OR FA7E: 10 F8 402 BPL XQ1 ; NBRANCH FROM XEQ. FA80: 20 3F FF 403 JSR[...]
-
Page 27
FADE: A9 00 457 LDA #ACC/256 FAE0: 85 41 458 STA A3H FAE2: A2 FB 459 LDX #$FB FAE4: A9 A0 460 RDSP1 LDA #$A0 FAE6: 20 ED FD 461 JSR COUT FAE9: BD 1E FA 462 LDA RTBL-$FB,X FAEC: 20 ED FD 463 JSR COUT FAEF: A9 BD 464 LDA #$BD FAF1: 20 ED FD 465 JSR COUT FAF4: B5 4A 466 LDA ACC+5,X FAF6: 20 DA FD 467 JSR PRBYTE FAF9: E8 468 INX FAFA: 30 E8 469 BMI RDS[...]
-
Page 28
FB59: A9 17 519 LDA #$17 FB5B: 85 25 520 TABV STA CV ;VTABS TO ROW IN A-REG FB5D: 4C 22 FC 521 JMP VTAB FB60: 20 A4 FB 522 MULPM JSR MD1 ;ABS VAL OF AC AUX FB63: A0 10 523 MUL LDY #$10 ;INDEX FOR 16 BITS FB65: A5 50 524 MUL2 LDA ACL ;ACX * AUX + XTND FB67: 4A 525 LSR ; TO AC, XTND FB68: 90 0C 526 BCC MUL4 ;IF NO CARRY, FB6A: 18 527 CLC ; NO PARTIAL[...]
-
Page 29
FBC7: 85 29 581 STA BASH ; BASH=000001CD FBC9: 68 582 PLA ; AND FBCA: 29 18 583 AND #$18 ; BASL=EABAB000 FBCC: 90 02 584 BCC BSCLC2 FBCE: 69 7F 585 ADC #$7F FBD0: 85 28 586 BSCLC2 STA BASL FBD2: 0A 587 ASL FBD3: 0A 588 ASL FBD4: 05 28 589 ORA BASL FBD6: 85 28 590 STA BASL FBD8: 60 591 RTS FBD9: C9 87 592 BELL1 CMP #$87 ;BELL CHAR? (CNTRL-G) FBDB: D[...]
-
Page 30
FC3E: 90 5C 643 BCC CLREOL ; E, CLEAR TO END OF LINE FC40: D0 E9 644 BNE RTS4 ; NOT F, RETURN FC42: A4 24 645 CLREOP LDY CH ;CURSOR H TO Y INDEX FC44: A5 25 646 LDA CV ;CURSOR V TO A-REGISTER FC46: 48 647 CLEOP1 PHA ;SAVE CURRENT LINE ON STK FC47: 20 24 FC 648 JSR VTABZ ;CALC BASE ADDRESS FC4A: 20 9E FC 649 JSR CLEOLZ ;CLEAR TO EOL, SET CARRY FC4D:[...]
-
Page 31
FCB3: 60 705 RTS FCB4: E6 42 706 NXTA4 INC A4L ;INCR 2-BYTE A4 FCB6: D0 02 707 BNE NXTA1 ; AND A1 FCB8: E6 43 708 INC A4H FCBA: A5 3C 709 NXTA1 LDA A1L ;INCR 2-BYTE A1. FCBC: C5 3E 710 CMP A2L FCBE: A5 3D 711 LDA A1H ; AND COMPARE TO A2 FCC0: E5 3F 712 SBC A2H FCC2: E6 3C 713 INC A1L ; (CARRY SET IF >=) FCC4: D0 02 714 BNE RTS4B FCC6: E6 3D 715 [...]
-
Page 32
FD26: 91 28 767 STA (BASL),Y ;REPLACE FLASHING SCREEN FD28: AD 00 C0 768 LDA KBD ;GET KEYCODE FD2B: 2C 10 C0 769 BIT KBDSTRB ;CLR KEY STROBE FD2E: 60 770 RTS FD2F: 20 0C FD 771 ESC JSR RDKEY ;GET KEYCODE FD32: 20 2C FC 772 JSR ESC1 ; HANDLE ESC FUNC. FD35: 20 0C FD 773 RDCHAR JSR RDKEY ;READ KEY FD38: C9 9B 774 CMP #$9B ;ESC? FD3A: F0 F3 775 BEQ ES[...]
-
Page 33
FDAD: A5 3C 829 MODSCHK LDA A1L FDAF: 29 07 830 AND #$07 FDB1: D0 03 831 BNE DATAOUT FDB3: 20 92 FD 832 XAM JSR PRA1 FDB6: A9 A0 833 DATAOUT LDA #$A0 FDB8: 20 ED FD 834 JSR COUT ;OUTPUT BLANK FDBB: B1 3C 835 LDA (A1L),Y FDBD: 20 DA FD 836 JSR PRBYTE ;OUTPUT BYTE IN HEX FDC0: 20 BA FC 837 JSR NXTA1 FDC3: 90 E8 838 BCC MODSCHK ;CHECK IF TIME TO, FDC5[...]
-
Page 34
FE20: A2 01 891 LT LDX #$01 FE22: B5 3E 892 LT2 LDA A2L,X ;COPY A2 (2 BYTES) TO FE24: 95 42 893 STA A4L,X ; A4 AND A5 FE26: 95 44 894 STA A5L,X FE28: CA 895 DEX FE29: 10 F7 896 BPL LT2 FE2B: 60 897 RTS FE2C: B1 3C 898 MOVE LDA (A1L),Y ;MOVE (A1 TO A2) TO FE2E: 91 42 899 STA (A4L),Y ; (A4) FE30: 20 B4 FC 900 JSR NXTA4 FE33: 90 F7 901 BCC MOVE FE35: [...]
-
Page 35
FE9B: A5 3E 953 IOPRT LDA A2L ;SET RAM IN/OUT VECTORS FE9D: 29 0F 954 AND #$0F FE9F: F0 06 955 BEQ IOPRT1 FEA1: 09 C0 956 ORA #IOADR/256 FEA3: A0 00 957 LDY #$00 FEA5: F0 02 958 BEQ IOPRT2 FEA7: A9 FD 959 IOPRT1 LDA #COUT1/256 FEA9: 94 00 960 IOPRT2 STY LOC0,X FEAB: 95 01 961 STA LOC1,X FEAD: 60 962 RTS FEAE: EA 963 NOP FEAF: EA 964 NOP FEB0: 4C 00[...]
-
Page 36
FF24: 90 F0 1015 BCC RD3 ;LOOP UNTIL DONE FF26: 20 EC FC 1016 JSR RDBYTE ;READ CHKSUM BYTE FF29: C5 2E 1017 CMP CHKSUM FF2B: F0 0D 1018 BEQ BELL ;GOOD, SOUND BELL AND RETURN FF2D: A9 C5 1019 PRERR LDA #$C5 FF2F: 20 ED FD 1020 JSR COUT ;PRINT "ERR", THEN BELL FF32: A9 D2 1021 LDA #$D2 FF34: 20 ED FD 1022 JSR COUT FF37: 20 ED FD 1023 JSR CO[...]
-
Page 37
FFA0: 95 41 1077 STA A3H,X FFA2: E8 1078 NXTBS2 INX FFA3: F0 F3 1079 BEQ NXTBAS FFA5: D0 06 1080 BNE NXTCHR FFA7: A2 00 1081 GETNUM LDX #$00 ;CLEAR A2 FFA9: 86 3E 1082 STX A2L FFAB: 86 3F 1083 STX A2H FFAD: B9 00 02 1084 NXTCHR LDA IN,Y ;GET CHAR FFB0: C8 1085 INY FFB1: 49 B0 1086 EOR #$B0 FFB3: C9 0A 1087 CMP #$0A FFB5: 90 D3 1088 BCC DIG ;IF HEX [...]
-
Page 38
FFF2: 5D 1139 DFB LIST-1 FFF3: CC 1140 DFB WRITE-1 FFF4: B5 1141 DFB GO-1 FFF5: FC 1142 DFB READ-1 FFF6: 17 1143 DFB SETMODE-1 FFF7: 17 1144 DFB SETMODE-1 FFF8: F5 1145 DFB CRMON-1 FFF9: 03 1146 DFB BLANK-1 FFFA: FB 1147 DFB NMI ;NMI VECTOR FFFB: 03 1148 DFB NMI/256 FFFC: 59 1149 DFB RESET ;RESET VECTOR FFFD: FF 1150 DFB RESET/256 FFFE: 86 1151 DFB[...]
-
Page 39
+------------------------------------------------------------------------ | TOPIC -- Apple II -- Red Book Sweet-16 listing +------------------------------------------------------------------------ 1 *********************** 2 * * 3 * APPLE-II PSEUDO * 4 * MACHINE INTERPRETER * 5 * * 6 * COPYRIGHT 1977 * 7 * APPLE COMPUTER INC * 8 * * 9 * ALL RIGHTS [...]
-
Page 40
F6C5: 4A 57 LSR ;PREPARE CARRY FOR BC, BNC. F6C6: 60 58 RTS ;GOTO NON-REG OP ROUTINE F6C7: 68 59 RTNZ PLA ;POP RETURN ADDRESS F6C8: 68 60 PLA F6C9: 20 3F FF 61 JSR RESTORE ;RESTORE 6502 REG CONTENTS F6CC: 6C 1E 00 62 JMP (R15L) ;RETURN TO 6502 CODE VIA PC F6CF: B1 1E 63 SETZ LDA (R15L),Y ;HIGH-ORDER BYTE OF CONSTANT F6D1: 95 01 64 STA R0H,X F6D3: 8[...]
-
Page 41
F717: A5 00 119 STAT LDA R0L F719: 81 00 120 STAT2 STA (R0L,X) ;STORE BYTE INDIRECT F71B: A0 00 121 LDY #$0 F71D: 84 1D 122 STAT3 STY R14H ;INDICATE R0 IS RESULT NEG F71F: F6 00 123 INR INC R0L,X F721: D0 02 124 BNE INR2 ;INCR RX F723: F6 01 125 INC R0H,X F725: 60 126 INR2 RTS F726: A1 00 127 LDAT LDA (R0L,X) ;LOAD INDIRECT (RX) F728: 85 00 128 STA[...]
-
Page 42
F796: 20 19 F7 181 JSR STAT2 ;PUSH LOW PC BYTE VIA R12 F799: A5 1F 182 LDA R15H F79B: 20 19 F7 183 JSR STAT2 ;PUSH HIGH-ORDER PC BYTE F79E: 18 184 BR CLC F79F: B0 0E 185 BNC BCS BNC2 ;NO CARRY TEST F7A1: B1 1E 186 BR1 LDA (R15L),Y ;DISPLACEMENT BYTE F7A3: 10 01 187 BPL BR2 F7A5: 88 188 DEY F7A6: 65 1E 189 BR2 ADC R15L ;ADD TO PC F7A8: 85 1E 190 STA[...]
-
Page 43
+------------------------------------------------------------------------ | TOPIC -- Apple II -- WOZPAK Sweet-16 article by Steve Wozniak +------------------------------------------------------------------------ SWEET 16: A Pseudo 16 Bit Microprocessor by Steve Wozniak Description: ------------ While writing APPLE BASIC for a 6502 microprocessor, I[...]
-
Page 44
30A 41 MLOOP LD @R1 ;R1 holds source 30B 52 ST @R2 ;R2 holds dest. addr. 30C F3 DCR R3 ;Decr. length 30D 07 FB BNZ MLOOP ;Loop until done 30F 00 RTN ;Return to 6502 mode. 310 C9 C5 NOMOVE CMP #"E" ;"E" char? 312 D0 13 BEQ EXIT ;Yes, exit 314 C8 INY ;No, cont. NOTE: Registers A, X, Y, P, and S are not disturbed by SWEET 16. Instr[...]
-
Page 45
En INR Rn (Increment) Fn DCR Rn (Decrement) Non-register OPS- 00 RTN (Return to 6502 mode) 01 BR ea (Branch always) 02 BNC ea (Branch if No Carry) 03 BC ea (Branch if Carry) 04 BP ea (Branch if Plus) 05 BM ea (Branch if Minus) 06 BZ ea (Branch if Zero) 07 BNZ ea (Branch if NonZero) 08 BM1 ea (Branch if Minus 1) 09 BNM1 ea (Branch if Not Minus 1) 0A[...]
-
Page 46
EXAMPLE: 25 LD R5 ;Copy the contents 36 ST R6 ;of R5 to R6 LOAD INDIRECT: LD @Rn [ 4n ] The low-order ACC byte is loaded from the memory location whose address resides in Rn and the high-order ACC byte is cleared. Branch conditions reflect the final ACC contents which will always be positive and never minus 1. The carry is cleared. After the transf[...]
-
Page 47
STORE DOUBLE-BYTE INDIRECT: STD @Rn [ 7n ] The low-order ACC byte is stored into memory location whose address resides in Rn, and Rn is the incremented by 1. The high-order ACC byte is stored into the memory location whose address resides in the incremented Rn, and Rn is again incremented by 1. Branch conditions reflect the ACC contents which are n[...]
-
Page 48
EXAMPLE: 14 34 A0 SET R4 $A034 ;Init pointers 15 22 90 SET R5 $9022 84 POP @R4 ;Move byte from 95 STP @R5 ;$A033 to $9021 84 POP @R4 ;Move byte from 95 STP @R5 ;$A032 to $9020 ADD: ADD Rn [ An ] The contents of Rn are added to the contents of ACC (R0), and the low-order 16 bits of the sum restored in ACC. the 17th sum bit becomes the carry and the [...]
-
Page 49
from the memory location whose address now resides in Rn. Rn is again decremented by 1 and the low-order ACC byte is loaded from the corresponding memory location. Branch conditions reflect the final ACC contents. The carry is cleared. Because Rn is decremented prior to loading each of the ACC halves, double-byte stacks may be implemented with the [...]
-
Page 50
DECREMENT: DCR Rn [ Fn ] The contents of Rn are decremented by 1. The carry is cleared and other branch conditions reflect the decremented value. EXAMPLE: (Clear 9 bytes beginning at location A034) 15 34 A0 SET R5 $A034 ;Init pointer 14 09 00 SET R4 9 ;Init counter B0 SUB R0 ;Zero ACC 55 LOOP2 ST @R5 ;Clear a mem byte F4 DCR R4 ;Decrement count 07 [...]
-
Page 51
$300: 01 50 BR $352 BRANCH IF NO CARRY: BNC ea [ 02 d ] A branch to the effective address is taken only is the carry is clear, otherwise execution resumes as normal with the next instruction. Branch conditions are not changed. BRANCH IF CARRY SET: BC ea [ 03 d ] A branch is effected only if the carry is set. Branch conditions are not changed. BRANC[...]
-
Page 52
BRANCH IF MINUS ONE BM1 ea [ 08 d ] A branch is effected only if the prior 'result' was minus one ($FFFF Hex). Branch conditions are not changed. BRANCH IF NOT MINUS ONE BNM1 ea [ 09 d ] A branch effected only if the prior 'result' was not minus 1. Branch conditions are not changed. BREAK: BK [ 0A ] A 6502 BRK (break) instructio[...]
-
Page 53
Theory of Operation: -------------------- SWEET 16 execution mode begins with a subroutine call to SW16. All 6502 registers are saved at this time, to be restored when a SWEET 16 RTN instruction returns control to the 6502. If you can tolerate indefinate 6502 register contents upon exit, approximately 30 usec may be saved by entering at SW16 + 3. B[...]
-
Page 54
To save code, the subroutine entry address (minus 1) is pushed onto the stack, high-order byte first. A 6502 RTS (return from subroutine) is used to pop the address off the stack and into the 6502 PC (after incrementing by 1). The net result is that the desired subroutine is reached by executing a subroutine return instruction! Opcode Subroutines: [...]
-
Page 55
User Modifications: ------------------- You may wish to add some of your own instructions to this implementation of SWEET 16. If you use the unassigned opcodes $0E and $0F, remember that SWEET 16 treats these as 2-byte instructions. You may wish to handle the break instruction as a SWEET 16 call, saving two bytes of code each time you transfer into[...]
-
Page 56
+------------------------------------------------------------------------ | TOPIC -- Apple II -- WOZPAK Sweet-16 article by Dick Sedgewick +------------------------------------------------------------------------ SWEET 16 - INTRODUCTION by Dick Sedgewick Sweet 16 is probably the least used and least understood seed in the Apple ][. In exactly the s[...]
-
Page 57
$301, $302, and $312 respectively). The SWEET 16 subroutine of course performs the move, and is entered at Hex locations $303 to $311 (see listing Number 3). After the move, the screen will display three lines of data, each 8 bytes long, and await entry of a new set of parameters. The three lines of data displayed on the screen are as follows: Line[...]
-
Page 58
studied in the first four SWEET 16 registers. Therefore, the 8 byte display starting at $0000 is large enough for this purpose. These four registers are established as R0, R1, R2, R3: R0 $0000 & 0001 -SWEET 16 accumulator R1 $0002 & 0003 -Source address R2 $0004 & 0005 -Destination address R3 $0006 & 0007 -Number of bytes to move . [...]
-
Page 59
| | | | | String VN DSP NVA DATA DATA Terminator The SWEET 16 registers are as shown: low high low high low high low high $0000 1E 00 08 08 08 0A 00 00 ---------- ---------- ---------- ---------- | | | | register register register register R0 R1 R2 R3 (acc) (source) (dest) (#bytes) The low order byte of R0, the SWEET 16 accumulator, has $1E in it, [...]
-
Page 60
40 INPUT "ENTER # BYTES " , B 50 IF NOT B THEN 40 : REM AT LEAST 1 60 POKE 778 , B : REM POKE LENGTH 70 INPUT "ENTER DESTINATION " , A 80 IF A > PEEK (203) - 1 THEN 70 90 IF A < PEEK (205) + 1 THEN 70 100 POKE 776 , A : REM POKE DESTINATION 110 M = 8 : GOSUB 160 : REM DISPLAY 120 CALL 768 : REM GOTO $0300 130 M = A : GOSUB[...]
-
Page 61
+------------------------------------------------------------------------ | TOPIC -- Apple II -- Red Book Mini-Assembler listing +------------------------------------------------------------------------ 1 *********************** 2 * * 3 * APPLE-II * 4 * MINI-ASSEMBLER * 5 * * 6 * COPYRIGHT 1977 BY * 7 * APPLE COMPUTER INC. * 8 * * 9 * ALL RIGHTS RE[...]
-
Page 62
F50D: 8A 57 TXA F50E: 18 58 CLC F50F: E5 3A 59 SBC PCL ;FORM ADDR-PC-2 F511: 85 3E 60 STA A2L F513: 10 01 61 BPL REL3 F515: C8 62 INY F516: 98 63 REL3 TYA F517: E5 3B 64 SBC PCH F519: D0 6B 65 ERR3 BNE ERR ;ERROR IF >1-BYTE BRANCH F51B: A4 2F 66 FINDOP LDY LENGTH F51D: B9 3D 00 67 FNDOP2 LDA A1H,Y ;MOVE INST TO (PC) F520: 91 3A 68 STA (PCL),Y F5[...]
-
Page 63
F58F: 20 ED FD 119 JSR COUT ;POSITION. F592: 20 3A FF 120 RESETZ JSR BELL F595: A9 A1 121 NXTLINE LDA #$A1 ;'!' F597: 85 33 122 STA PROMPT ;INITIALIZE PROMPT F599: 20 67 FD 123 JSR GETLNZ ;GET LINE. F59C: 20 C7 FF 124 JSR ZMODE ;INIT SCREEN STUFF F59F: AD 00 02 125 LDA IN ;GET CHAR F5A2: C9 A0 126 CMP #$A0 ;ASCII BLANK? F5A4: F0 13 127 BE[...]
-
Page 64
F60D: 86 3D 181 FORM7 STX A1H ;SAVE INDEX F60F: CA 182 DEX ;DONE WITH FORMAT CHECK? F610: 10 C9 183 BPL FORM2 ;NO. F612: A5 44 184 LDA FMT ;YES, PUT LENGTH F614: 0A 185 ASL ;IN LOW BITS F615: 0A 186 ASL F616: 05 35 187 ORA L F618: C9 20 188 CMP #$20 F61A: B0 06 189 BCS FORM8 ;ADD "$" IF NONZERO LENGTH F61C: A6 35 190 LDX L ;AND DON'T[...]
-
Page 65
+------------------------------------------------------------------------ | TOPIC -- Apple II -- Red Book Floating point listing +------------------------------------------------------------------------ Apple II Reference Manual (Red Book), January 1978, pages 94-95. *********************** * * * APPLE-II FLOATING * * POINT ROUTINES * * * * COPYRIG[...]
-
Page 66
F461: 26 F9 ROL M1 F463: A5 F8 NORM LDA X1 EXP1 ZERO? F465: D0 EE BNE NORM1 NO, CONTINUE NORMALIZING. F467: 60 RTS1 RTS RETURN. F468: 20 A4 F4 FSUB JSR FCOMPL CMPL MANT1,CLEARS CARRY UNLESS 0 F46B: 20 7B F4 SWPALGN JSR ALGNSWP RIGHT SHIFT MANT1 OR SWAP WITH F46E: A5 F4 FADD LDA X2 F470: C5 F8 CMP X1 COMPARE EXP1 WITH EXP2. F472: D0 F7 BNE SWPALGN I[...]
-
Page 67
F4D7: 26 F6 ROL M2+1 SHIFT DIVIDEND LEFT F4D9: 26 F5 ROL M2 F4DB: B0 1C BCS OVFL OVFL IS DUE TO UNNORMED DIVISOR F4DD: 88 DEY NEXT DIVIDE ITERATION. F4DE: D0 DA BNE DIV1 LOOP UNTIL DONE 23 ITERATIONS. F4E0: F0 BE BEQ MDEND NORM. QUOTIENT AND CORRECT SIGN. F4E2: 86 FB MD2 STX M1+2 F4E4: 86 FA STX M1+1 CLEAR MANT1 (3 BYTES) FOR MUL/DIV. F4E6: 86 F9 S[...]
-
Page 68
+------------------------------------------------------------------------ | TOPIC -- Apple II -- WOZPAK Floating point routines description +------------------------------------------------------------------------ Wozpak ][, November 1979, pages 109-115. FLOATING POINT PACKAGE The mantissa-exponent, or 'floating point' numerical represent[...]
-
Page 69
The exponent is a binary scaling factor (power of two) which is applied to the mantissa. Ranging from -128 to +127, the exponent is stored in standard two's complement representation except for the sign bit which is complemented. This representation allows direct comparison of exponents, since they are stored in increasing numerical sequence. [...]
-
Page 70
- 3 81 A0 00 00 - 4 81 80 00 00 - 5 82 B0 00 00 - 7 82 90 00 00 -12 83 A0 00 00 -15 83 88 00 00 -17 84 BC 00 00 -20 84 B0 00 00 -60 85 88 00 00 FLOATING POINT SUBROUTINE DESCRIPTIONS FCOMPL subroutine (address $F4A4) Purpose: FCOMPL is used to negate floating point numbers. Entry: A normalized or unnormalized value is in FP1 (floating point accumul[...]
-
Page 71
FADD subroutine (address $F46E) Purpose: To add two numbers in floating point form. Entry: The two addends are in FP1 and FP2 respectively. For maximum precision, both should be normalized. Uses: SWPALGN, ADD, NORM, RTLOG. Exit: The normalized sum is left in FP1. FP2 contains the addend of greatest magnitude. E is altered but sign is not. The A-REG[...]
-
Page 72
FSUB subroutine (address $F468) Purpose: To subtract two floating point numbers. Entry: The minuend is in FP1 and the subtrahend is in FP2. Both should be normalized to retain maximum precision prior to calling FSUB. Uses: FCOMPL, ALGNSWP, FADD, ADD, NORM, RTLOG. Exit: The normalized difference is in FP1 with the mantissa truncated to 24 bits. FP2 [...]
-
Page 73
truncated to contain the 24 most significant mantissa bits (including sign). The absolute value of the multiplier mantissa (M2) is left in FP2. E, SIGN, and SCR are altered. The A- and X-REGs are altered and the Y-REG contains $FF upon exit. Cautions: An exit to location $3F5 is taken if the product is less than -2^128 or greater than +2^128-1. Not[...]
-
Page 74
altered. The A- and X-REGs are altered and the Y-REG is cleared. Uses: MD1, MD2, MDEND. Cautions: An exit to location $3F5 is taken if the quotient is less than -2^128 or greater than +2^128-1 Notes: MD2 contains the remainder mantissa (equivalent to the MOD function). The remainder exponent is the same as the quotient exponent, or 1 less if the di[...]
-
Page 75
M1+2 prior to calling FLOAT. FLOAT takes approximately 3 msec. lonqer to convert zero to floating point form than other arguments. The user may check for zero prior to calling FLOAT and increase throughput. * * LOW-ORDER INT. BYTE IN A-REG * HIGH-ORDER BYTE IN Y-REG * 85 FA XFLOAT STA M1+1 84 F9 STY M1 INIT MANT1 A0 00 LDY #$0 84 FB STY M1+2 05 D9 [...]
-
Page 76
Exit: The two-byte signed two's complement representation of the integer portion is left in M1 (high-order byte) and M1+1 (low-order byte). The floating point values +24.63 and -61.2 are converted to the integers +24 and -61 respectively. FP1 and E are altered but FP2, E, SIGN, and SCR are not. The A- and X-REGs are altered but the Y-REG is no[...]
-
Page 77
|_____| |_____| |_____| |_____| X1 M1 NORM1 subroutine (address $F455) Purpose: To normalize a floating point value in FP1 when it is known the exponent is not -128 (X1=0) upon entry. Entry: An unnormalized number is in FP1. The exponent byte should not be 0 for normal use. Exit: The normalized value is in FP1. E, FP2, SIGN, and SCR are not not dis[...]
-
Page 78
ABSWAP Subroutine (address $F437) Purpose: To take the absolute value of FP1 and then swap FP1 with FP2. Note that two sequential calls to ABSWAP will take the absolute values of both FP1 and FP2 in preparation for a multiply or divide. Entry: FP1 and FP2 contain floating point values. Exit: The absolute value of the original FP1 contents are in FP[...]
-
Page 79
Note: M1 sign bit is unchanged. RTLOG subroutine (address $F480) Purpose: To shift the 6-byte field MANT1 and E one bit to the right (toward the least significant bit). The 6502 carry bit is shifted into the high-order M1 bit. This is useful in correcting binary sum overflows. Entry: A normalized or unnormalized floating point value is in FP1. The [...]
-
Page 80
MD2 subroutine (address $F4E2) Purpose: To clear the 3-byte MANT1 field for FMUL and FDIV, check for inital result exponent overflow (and underflow), and initialize the X-REG to $17 for loop counting. Entry: the X-REG is cleared by the user since it is placed in the 3 bytes of MANT1. The A-REG contains the result of an exponent addition (FMUL) or s[...]
-
Page 81
+------------------------------------------------------------------------ | TOPIC -- Apple II -- DDJ Floating point article +------------------------------------------------------------------------ Dr. Dobb's Journal, August 1976, pages 17-19. Floating Point Routines for the 6502 by Roy Rankin, Department of Mechanical Engineering, Stanford Un[...]
-
Page 82
exit used in the event of a non-positive log argument. OVFLW (1E3B) is the error exit for overflow occuring during calculation of e to some power. OVFL (1FE4) is the error exit for overflow in all of the floating point routines. There is no trap for underflow; in such cases, the result is set to 0.0. All routines are called and exited in a uniform [...]
-
Page 83
* WHEN THE NUMBER IS LESS THAN 2**(-128). * * EXPONENT: THE EXPONENT REPRESENTS POWERS OF TWO. THE * REPRESENTATION IS 2'S COMPLIMENT EXCEPT THAT THE SIGN * BIT (BIT 7) IS COMPLIMENTED. THIS ALLOWS DIRECT COMPARISON * OF EXPONENTS FOR SIZE SINCE THEY ARE STORED IN INCREASING * NUMERICAL SEQUENCE RANGING FROM $00 (-128) TO $FF (+127) * ($ MEANS[...]
-
Page 84
1D3D 95 04 STA X2,X 1D3F CA DEX 1D40 10 F0 BPL SAVET 1D42 20 50 1F JSR FADD Z+SQRT(2) 1D45 A2 03 LDX =3 4 BYTE TRANSFER 1D47 B5 14 TM2 LDA T,X 1D49 95 04 STA X2,X LOAD T INTO EXP/MANT2 1D4B CA DEX 1D4C 10 F9 BPL TM2 1D4E 20 9D 1F JSR FDIV T=(Z-SQRT(2))/(Z+SQRT(2)) 1D51 A2 03 LDX =3 4 BYTE TRANSFER 1D53 B5 08 MIT LDA X1,X 1D55 95 14 STA T,X COPY EXP[...]
-
Page 85
* COMMON LOG OF MANT/EXP1 RESULT IN MANT/EXP1 * 1DBC 20 00 1D LOG10 JSR LOG COMPUTE NATURAL LOG 1DBF A2 03 LDX =3 1DC1 BD CD 1D L10 LDA LN10,X 1DC4 95 04 STA X2,X LOAD EXP/MANT2 WITH 1/LN(10) 1DC6 CA DEX 1DC7 10 F8 BPL L10 1DC9 20 77 1F JSR FMUL LOG10(X)=LN(X)/LN(10) 1DCC 60 RTS * 1DCD 7E 6F LN10 DCM 0.4342945 2D ED 1DD1 80 5A R22 DCM 1.4142136 SQR[...]
-
Page 86
1E3B 00 OVFLW BRK OVERFLOW * 1E3C 20 2C 1F CONTIN JSR FLOAT FLOAT INT 1E3F A2 03 LDX =3 1E41 B5 10 ENTD LDA Z,X 1E43 95 04 STA X2,X LOAD EXP/MANT2 WITH Z 1E45 CA DEX 1E46 10 F9 BPL ENTD 1E48 20 4A 1F JSR FSUB Z*Z-FLOAT(INT) 1E4B A2 03 LDX =3 4 BYTE MOVE 1E4D B5 08 ZSAV LDA X1,X 1E4F 95 10 STA Z,X SAVE EXP/MANT1 IN Z 1E51 95 04 STA X2,X COPY EXP/MAN[...]
-
Page 87
1EBB 95 04 STA X2,X LOAD EXP/MANT2 WITH Z 1EBD CA DEX 1EBE 10 F9 BPL LF3 1EC0 20 9D 1F JSR FDIV Z/(**** ) 1EC3 A2 03 LDX =3 4 BYTE TRANSFER 1EC5 BD E5 1D LD12 LDA MHLF,X 1EC8 95 04 STA X2,X LOAD EXP/MANT2 WITH .5 1ECA CA DEX 1ECB 10 F8 BPL LD12 1ECD 20 50 1F JSR FADD +Z/(***)+.5 1ED0 38 SEC ADD INT TO EXPONENT WITH CARRY SET 1ED1 A5 1C LDA INT TO M[...]
-
Page 88
* * 1F2C A9 8E FLOAT LDA =$8E 1F2E 85 08 STA X1 SET EXPN TO 14 DEC 1F30 A9 00 LDA =0 CLEAR LOW ORDER BYTE 1F32 85 0B STA M1+2 1F34 F0 08 BEQ NORM NORMALIZE RESULT 1F36 C6 08 NORM1 DEC X1 DECREMENT EXP1 1F38 06 0B ASL M1+2 1F3A 26 0A ROL M1+1 SHIFT MANT1 (3 BYTES) LEFT 1F3C 26 09 ROL M1 1F3E A5 09 NORM LDA M1 HIGH ORDER MANT1 BYTE 1F40 0A ASL UPPER [...]
-
Page 89
1F8D 90 AF NORMX BCC NORM IF EXEN, NORMALIZE PRODUCT, ELSE COMPLEMENT 1F8F 38 FCOMPL SEC SET CARRY FOR SUBTRACT 1F90 A2 03 LDX =$03 INDEX FOR 3 BYTE SUBTRACTION 1F92 A9 00 COMPL1 LDA =$00 CLEAR A 1F94 F5 08 SBC X1,X SUBTRACT BYTE OF EXP1 1F96 95 08 STA X1,X RESTORE IT 1F98 CA DEX NEXT MORE SIGNIFICANT BYTE 1F99 D0 F7 BNE COMPL1 LOOP UNTIL DONE 1F9B[...]
-
Page 90
1FEE 60 RTRN RTS RETURN END *************************************************************************** Dr. Dobb's Journal, November/December 1976, page 57. ERRATA FOR RANKIN'S 6502 FLOATING POINT ROUTINES Sept. 22, 1976 Dear Jim, Subsequent to the publication of "Floating Point Routines for the 6502" (Vol.1, No.7) an error whic[...]
-
Page 91
+------------------------------------------------------------------------ | TOPIC -- Apple II -- IA Floating point article +------------------------------------------------------------------------ Interface Age, November 1976, pages 103-111. Floating Point Routines for the 6502* by Roy Rankin Department of Mechanical Engineering, Stanford Universit[...]
-
Page 92
|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_| |7 6 5 4 3 2 1 0|7 6.5 4 3 2 1 0|7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0| | | | | | | BYTE N | BYTE N+1 | BYTE N+2 | BYTE N+3 | | | | | | | | MOST SIG BYTE | | LEAST SIG BYTE| | | MANTISSA | | MANTISSA | | | | | | |<- EXPONENT ->|<--- THREE BYTE MANTISSA --->| | (TWOS COMPLEMENT [...]
-
Page 93
mant1 and act as floating point registers. On entry to the subroutines these registers contain the numbers to be operated upon and contain the result on return, The function of the registers is given before each entry point in the source listing. There are three error traps which will cause a software interrupts. ERROT (1D06) is encountered if the [...]
-
Page 94
39 0003 EA SIGN NOP 40 0004 EA X2 NOP EXPONENT 2 41 0005 00 00 00 M2 BSS 3 MANTISSA 2 42 0008 EA X1 NOP EXPONENT 1 43 0009 00 00 00 M1 BSS 3 MANTISSA 1 44 000C E BSS 4 SCRATCH 45 0010 Z BSS 4 46 0014 T BSS 4 47 0018 SEXP BSS 4 48 001C 00 INT BSS 1 49 * 50 1D00 ORG $1D00 STARTING LOCATION FOR LOG 51 * 52 * NATURAL LOG OF MANT/EXP1 WITH RESULT IN MAN[...]
-
Page 95
101 1D5D 10 F7 BPL MIT 102 1D5F 20 77 1F JSR FMUL T*T 103 1D62 20 1C 1F JSR SWAP MOVE T*T TO EXP/MANT2 104 1D65 A2 03 LDX =3 4 BYTE TRANSFER 105 1D67 BD E4 1D MIC LDA C,X 106 1D6A 95 08 STA X1,X LOAD EXP/MANT1 WITH C 107 1D6C CA DEX 108 1D6D 10 F8 BPL MIC 109 1D6F 20 4A 1F JSR FSUB T*T-C 110 1D72 A2 03 LDX =3 4 BYTE TRANSFER 111 1D74 BD E0 1D M2MB [...]
-
Page 96
161 1DD8 7F 58 LE2 DCM 0.69314718 LOG BASE E OF 2 B9 0C 162 1DDC 80 52 A1 DCM 1.2920074 B0 40 163 1DE0 81 AB MB DCM -2.6398577 86 49 164 1DE4 80 6A C DCM 1.6567626 08 66 165 1DE8 7F 40 MHLF DCM 0.5 00 00 166 * 167 1E00 ORG $1E00 STARTING LOCATION FOR EXP 168 * 169 * EXP OF MANT/EXP1 RESULT IN MANT/EXP1 170 * 171 1E00 A2 03 EXP LDX =3 4 BYTE TRANSFE[...]
-
Page 97
218 1E56 20 77 1F JSR FMUL Z*Z 219 1E59 A2 03 LDX =3 4 BYTE MOVE 220 1E5B BD DC 1E LA2 LDA A2,X 221 1E5E 95 04 STA X2,X LOAD EXP/MANT2 WITH A2 222 1E60 B5 08 LDA X1,X 223 1E62 95 18 STA SEXP,X SAVE EXP/MANT1 AS SEXP 224 1E64 CA DEX 225 1E65 10 F4 BPL LA2 226 1E67 20 50 1F JSR FADD Z*Z+A2 227 1E6A A2 03 LDX =3 4 BYTE MOVE 228 1E6C BD E0 1E LB2 LDA B[...]
-
Page 98
279 1ED7 60 RTS RETURN ANS=(.5+Z/(-Z+D+C2*Z*Z- B2/(Z*Z+A2))*2**(INT+1) 280 1ED8 80 5C L2E DCM 1.4426950409 LOG BASE 2 OF E 55 1E 281 1EDC 86 57 A2 DCM 87.417497202 6A E1 282 1EE0 89 4D B2 DCM 617.9722695 3F 1D 283 1EE4 7B 46 C2 DCM .03465735903 4A 70 284 1EE8 83 4F D DCM 9.9545957821 A3 03 285 * 286 * 287 * BASIC FLOATING POINT ROUTINES 288 * 289 1[...]
-
Page 99
335 1F41 45 09 EOR M1 336 1F43 30 04 BMI RTS1 YES,RETURN WITH MANT1 NORMALIZED 337 1F45 A5 08 LDA X1 EXP1 ZERO? 338 1F47 D0 ED BNE NORM1 NO, CONTINUE NORMALIZING 339 1F49 60 RTS1 RTS RETURN 340 * 341 * 342 * EXP/MANT2-EXP/MANT1 RESULT IN EXP/MANT1 343 * 344 1F4A 20 8F 1F FSUB JSR FCOMPL CMPL MANT1 CLEARS CARRY UNLESS ZERO 345 1F4D 20 5D 1F SWPALG J[...]
-
Page 100
396 * 397 1F9D 20 0D 1F FDIV JSR MD1 TAKE ABS VAL OF MANT1, MANT2 398 1FA0 E5 08 SBC X1 SUBTRACT EXP1 FROM EXP2 399 1FA2 20 CD 1F JSR MD2 SAVE AS QUOTIENT EXP 400 1FA5 38 DIV1 SEC SET CARRY FOR SUBTRACT 401 1FA6 A2 02 LDX =$02 INDEX FOR 3-BYTE INSTRUCTION 402 1FA8 B5 05 DIV2 LDA M2,X 403 1FAA F5 0C SBC E,X SUBTRACT A BYTE OF E FROM MANT2 404 1FAC 4[...]
-
Page 101
1D60 77 1F 20 1C 1F A2 03 BD E4 1D 95 08 CA 10 F8 20 1D70 4A 1F A2 03 BD E0 1D 95 04 CA 10 F8 20 9D 1F A2 1D80 03 BD DC 1D 95 04 CA 10 F8 20 50 1F A2 03 B5 14 1D90 95 04 CA 10 F9 20 77 1F A2 03 BD E8 1D 95 04 CA 1DA0 10 F8 20 50 1F A2 03 B5 18 95 04 CA 10 F9 20 50 1DB0 1F A2 03 BD D8 1D 95 04 CA 10 F8 20 77 1F 60 20 1DC0 00 1D A2 03 BD D0 1D 95 04 [...]
-
Page 102
+------------------------------------------------------------------------ | TOPIC -- SYM Computer -- SYM Monitor listing +------------------------------------------------------------------------ SYM-1 SUPERMON AND AUDIO CASSETTE INTERFACE SOURCES COMBINED AND CONVERTED TO TELEMARK ASSEMBLER (TASM) V3.1 0002 0000 ; 0003 0000 ;***** 0004 0000 ;***** [...]
-
Page 103
0055 A659 PCLR .BLOCK 1 ;PROG CTR 0056 A65A PCHR .BLOCK 1 0057 A65B SR .BLOCK 1 ;STACK 0058 A65C FR .BLOCK 1 ;FLAGS 0059 A65D AR .BLOCK 1 ;AREG 0060 A65E XR .BLOCK 1 ;XREG 0061 A65F YR .BLOCK 1 ;YREG 0062 A660 ; 0063 A660 ; I/O VECTORS FOLLOW 0064 A660 ; 0065 A660 INVEC .BLOCK 3 ;IN CHAR 0066 A663 OUTVEC .BLOCK 3 ;OUT CHAR 0067 A666 INSVEC .BLOCK 3[...]
-
Page 104
0117 801F 6C F6 FF JMP ($FFF6) 0118 8022 68 DETIRQ PLA ;IRQ (NON BRK) 0119 8023 AA TAX 0120 8024 68 PLA 0121 8025 28 PLP 0122 8026 6C F8 FF JMP ($FFF8) 0123 8029 20 86 8B SVIRQ JSR ACCESS ;SAVE REGS AND DISPLAY CODE 0124 802C 38 SEC 0125 802D 20 64 80 JSR SAVINT 0126 8030 A9 31 LDA #'1' 0127 8032 4C 53 80 JMP IDISP 0128 8035 08 USRENT PHP[...]
-
Page 105
0179 809F 20 64 80 JSR SAVINT 0180 80A2 20 D3 80 JSR DBOFF ;STOP NMI'S 0181 80A5 AD 56 A6 LDA TV 0182 80A8 D0 05 BNE TVNZ 0183 80AA A9 32 LDA #'2' 0184 80AC 4C 53 80 JMP IDISP 0185 80AF 20 37 83 TVNZ JSR OPCCOM ;TRACE WITH DELAY 0186 80B2 AD 5D A6 LDA AR 0187 80B5 20 4A 83 JSR OBCRLF ;DISPLAY ACC 0188 80B8 20 5A 83 JSR DELAY 0189 80B[...]
-
Page 106
0241 8131 10 02 BPL HASHUS+2 0242 8133 0A HASHUS ASL A ;HASH 'USER' CMDS TO ONE BYTE A 0243 8134 0A ASL A ;U0 = $14 THRU U17 =$1B 0244 8135 8D 57 A6 STA LSTCOM 0245 8138 20 1B 8A JSR INCHR ;GET SECOND 0246 813B F0 C2 BEQ GETCOM 0247 813D 18 CLC 0248 813E 6D 57 A6 ADC LSTCOM 0249 8141 29 0F AND #$0F 0250 8143 09 10 ORA #$10 0251 8145 10 D9[...]
-
Page 107
0303 81A0 9D 07 01 STA $0107,X 0304 81A3 BD 08 01 LDA $0108,X 0305 81A6 9D 04 01 STA $0104,X 0306 81A9 BD 06 01 LDA $0106,X 0307 81AC 9D 08 01 STA $0108,X 0308 81AF 98 TYA 0309 81B0 9D 06 01 STA $0106,X 0310 81B3 68 PLA 0311 81B4 AA TAX 0312 81B5 68 PLA 0313 81B6 28 PLP 0314 81B7 60 M15 RTS 0315 81B8 ; RESTORE EXCEPT A,F 0316 81B8 08 RESXAF PHP 031[...]
-
Page 108
0365 8206 38 SEC 0366 8207 60 RTS 0367 8208 A2 10 PSHOVE LDX #$10 ;PUSH PARMS DOWN 0368 820A 0E 4A A6 PRM10 ASL P3L 0369 820D 2E 4B A6 ROL P3H 0370 8210 2E 4C A6 ROL P2L 0371 8213 2E 4D A6 ROL P2H 0372 8216 2E 4E A6 ROL P1L 0373 8219 2E 4F A6 ROL P1H 0374 821C CA DEX 0375 821D D0 EB BNE PRM10 0376 821F 60 RTS 0377 8220 20 88 81 PARM JSR SAVER ;GET [...]
-
Page 109
0427 8291 18 CLC 0428 8292 60 M29 RTS 0429 8293 EE 4A A6 INCP3 INC P3L ;INCREMENT P3 (16 BITS) 0430 8296 D0 03 BNE *+5 0431 8298 EE 4B A6 INC P3H 0432 829B 60 RTS 0433 829C AE 4D A6 P2SCR LDX P2H ;MOVE P2 TO FE,FF 0434 829F 86 FF STX $FF 0435 82A1 AE 4C A6 LDX P2L 0436 82A4 86 FE STX $FE 0437 82A6 60 RTS 0438 82A7 AE 4B A6 P3SCR LDX P3H ;MOVE P3 TO[...]
-
Page 110
0489 8308 60 RTS 0490 8309 29 0F NIBASC AND #$0F ;NIBBLE IN A TO ASCII IN A 0491 830B C9 0A CMP #$0A ;LINE FEED 0492 830D B0 04 BCS NIBALF 0493 830F 69 30 ADC #$30 0494 8311 90 02 BCC EXITNB 0495 8313 69 36 NIBALF ADC #$36 0496 8315 60 EXITNB RTS 0497 8316 20 4D 83 CRLFSZ JSR CRLF ;PRINT CRLF, FF, FE 0498 8319 A6 FF LDX $FF 0499 831B A5 FE LDA $FE [...]
-
Page 111
0551 838E B0 FB BCS INST1 0552 8390 38 SEC 0553 8391 60 INST2 RTS 0554 8392 6C 67 A6 INJISV JMP (INSVEC+1) 0555 8395 ; 0556 8395 ; 0557 8395 ; *** EXECUTE BLOCKS BEGIN HERE 0558 8395 ; 0559 8395 BZPARM =* 0560 8395 ; ZERO PARM COMMANDS 0561 8395 ; 0562 8395 C9 52 REGZ CMP #'R' ;DISP REGISTERS 0563 8397 D0 5A BNE GOZ ;PC,S,F,A,X,Y 0564 839[...]
-
Page 112
0613 840C 48 PHA 0614 840D AC 5F A6 LDY YR 0615 8410 AE 5E A6 LDX XR 0616 8413 AD 5D A6 LDA AR 0617 8416 40 RTI 0618 8417 C9 11 LPZB CMP #$11 ;LOAD PAPER TAPE 0619 8419 F0 03 BEQ *+5 0620 841B 4C A7 84 JMP DEPZ 0621 841E 20 88 81 JSR SAVER 0622 8421 20 4D 83 JSR CRLF 0623 8424 A9 00 LDA #0 0624 8426 8D 52 A6 STA ERCNT 0625 8429 20 2E 83 LPZ JSR ZER[...]
-
Page 113
0675 84A1 20 D9 81 LDBYTE JSR INBYTE 0676 84A4 4C DD 82 JMP CHKSAD 0677 84A7 C9 44 DEPZ CMP #'D' ;DEPOSIT, 0 PARM - USE (OLD) 0678 84A9 D0 03 BNE MEMZ 0679 84AB 4C E1 84 JMP NEWLN 0680 84AE C9 4D MEMZ CMP #'M' ;MEM, 0 PARM - USE (OLD) 0681 84B0 D0 03 BNE VERZ 0682 84B2 4C 17 85 JMP NEWLOC 0683 84B5 C9 56 VERZ CMP #'V' [...]
-
Page 114
0737 8526 A0 00 LDY #$00 0738 8528 91 FE STA ($FE),Y 0739 852A D1 FE CMP ($FE),Y ;VERIFY MEM 0740 852C F0 03 BEQ NXTLOC 0741 852E 20 20 83 JSR OUTQM ;TYPE ? AND CONTINUE 0742 8531 20 B2 82 NXTLOC JSR INCCMP 0743 8534 18 CLC 0744 8535 90 E0 BCC NEWLOC 0745 8537 F0 3E NH42 BEQ EXITM1 0746 8539 50 04 BVC *+6 0747 853B C9 3C CMP #'<' 0748 [...]
-
Page 115
0799 859D 8D 4C A6 STA P2L 0800 85A0 18 CLC 0801 85A1 69 07 ADC #$07 0802 85A3 8D 4A A6 STA P3L 0803 85A6 AD 4B A6 LDA P3H 0804 85A9 8D 4D A6 STA P2H 0805 85AC 69 00 ADC #0 0806 85AE 8D 4B A6 STA P3H 0807 85B1 4C 40 86 JMP VER2+4 0808 85B4 C9 4A JUMP1 CMP #'J' ;JUMP (JUMP TABLE IN SYS RAM) 0809 85B6 D0 1F BNE L11B 0810 85B8 AD 4A A6 LDA P[...]
-
Page 116
0861 8619 ; 0862 8619 C9 10 STD2 CMP #$10 ;STORE DOUBLE BYTE 0863 861B D0 12 BNE MEM2 0864 861D 20 A7 82 JSR P3SCR 0865 8620 AD 4D A6 LDA P2H 0866 8623 A0 01 LDY #1 0867 8625 91 FE STA ($FE),Y 0868 8627 88 DEY 0869 8628 AD 4C A6 LDA P2L 0870 862B 91 FE STA ($FE),Y 0871 862D 18 CLC 0872 862E 60 RTS 0873 862F C9 4D MEM2 CMP #'M' ;CONTINUE M[...]
-
Page 117
0923 86A3 20 FA 86 SP2C JSR DIFFZ 0924 86A6 B0 03 BCS SP2D 0925 86A8 4C C4 81 SPEXIT JMP RESALL 0926 86AB 20 4D 83 SP2D JSR CRLF 0927 86AE CD 58 A6 CMP MAXRC 0928 86B1 90 05 BCC SP2E 0929 86B3 AD 58 A6 LDA MAXRC 0930 86B6 B0 02 BCS SP2F 0931 86B8 69 01 SP2E ADC #1 0932 86BA 8D 3D A6 SP2F STA RC 0933 86BD A9 3B LDA #$3B ;SEMI COLON 0934 86BF 20 47 8[...]
-
Page 118
0985 872B 20 C1 87 JSR BRTT ;INC ERCNT (UP TO FF) 0986 872E 20 B2 82 F3 JSR INCCMP 0987 8731 70 7C BVS B1 0988 8733 F0 EE BEQ F1 0989 8735 90 EC BCC F1 0990 8737 B0 76 F2 BCS B1 ;(ALWAYS) 0991 8739 C9 42 BLK3 CMP #'B' ;BLOCK MOVE (OVERLAP OKAY) 0992 873B F0 03 BEQ *+5 0993 873D 4C CD 87 JMP S13B 0994 8740 A9 00 LDA #0 0995 8742 8D 52 A6 S[...]
-
Page 119
1047 87B6 60 RTS 1048 87B7 A0 00 BMOVE LDY #0 ;MOVE 1 BYT + VER 1049 87B9 B1 FE LDA ($FE),Y 1050 87BB 91 FC STA ($FC),Y 1051 87BD D1 FC CMP ($FC),Y 1052 87BF F0 0B BEQ BRT 1053 87C1 AC 52 A6 BRTT LDY ERCNT ;INC ERCNT, DONT PASS FF 1054 87C4 C0 FF CPY #$FF 1055 87C6 F0 04 BEQ *+6 1056 87C8 C8 INY 1057 87C9 8C 52 A6 STY ERCNT 1058 87CC 60 BRT RTS 105[...]
-
Page 120
1109 8835 6D 4C A6 ADC P2L 1110 8838 A8 TAY 1111 8839 AD 4F A6 LDA P1H 1112 883C 6D 4D A6 ADC P2H 1113 883F AA TAX 1114 8840 38 SEC 1115 8841 98 TYA 1116 8842 ED 4A A6 SBC P3L 1117 8845 A8 TAY 1118 8846 8A TXA 1119 8847 ED 4B A6 SBC P3H 1120 884A AA TAX 1121 884B 98 TYA 1122 884C 20 F4 82 JSR OUTXAH 1123 884F 18 CLC 1124 8850 60 RTS 1125 8851 C9 45[...]
-
Page 121
1171 88B7 D0 13 BNE EXITGK 1172 88B9 20 CF 88 JSR GK 1173 88BC 8A TXA 1174 88BD 0A ASL A 1175 88BE 0A ASL A 1176 88BF 0A ASL A 1177 88C0 0A ASL A 1178 88C1 8D 3E A6 STA SCRE 1179 88C4 20 CF 88 JSR GK 1180 88C7 8A TXA 1181 88C8 18 CLC 1182 88C9 6D 3E A6 ADC SCRE 1183 88CC 4C B8 81 EXITGK JMP RESXAF 1184 88CF A9 00 GK LDA #0 1185 88D1 8D 55 A6 STA KS[...]
-
Page 122
1233 893B 49 07 EOR #$07 1234 893D D0 05 BNE LK1 1235 893F 2C 00 A4 BIT PADA 1236 8942 30 1A BMI NOKEY 1237 8944 C9 04 LK1 CMP #$04 1238 8946 90 02 BCC LK2 1239 8948 A9 03 LDA #$03 1240 894A 0A LK2 ASL A 1241 894B 0A ASL A 1242 894C 0A ASL A 1243 894D 0A ASL A 1244 894E 0A ASL A 1245 894F 0A ASL A 1246 8950 18 CLC 1247 8951 6D 3F A6 ADC SCRF 1248 8[...]
-
Page 123
1295 89B7 CA DEX 1296 89B8 88 DEY 1297 89B9 10 F0 BPL CON1 1298 89BB 4C C4 81 JMP RESALL 1299 89BE 20 AF 88 HKEY JSR GETKEY ;GET KEY FROM KB AND ECHO ON KB 1300 89C1 20 88 81 OUTDSP JSR SAVER ;DISPLAY OUT 1301 89C4 29 7F AND #$7F 1302 89C6 C9 07 CMP #$07 ;BELL? 1303 89C8 D0 03 BNE NBELL 1304 89CA 4C 75 89 JMP BEEPP3 ;YES - BEEP 1305 89CD 20 06 8A N[...]
-
Page 124
1357 8A2F D0 0B BNE INRT2 1358 8A31 AD 53 A6 LDA TECHO 1359 8A34 49 40 EOR #$40 ;TOGGLE CTL O BIT 1360 8A36 8D 53 A6 STA TECHO 1361 8A39 18 CLC 1362 8A3A 90 E2 BCC INCHR+3 ;GET GET ANOTHER CHAR 1363 8A3C C9 0D INRT2 CMP #$0D ;CARRIAGE RETURN? 1364 8A3E 4C B8 81 JMP RESXAF 1365 8A41 6C 61 A6 INJINV JMP (INVEC+1) 1366 8A44 20 09 83 NBASOC JSR NIBASC [...]
-
Page 125
1419 8ABD D0 FD BNE PHAKE 1420 8ABF EA NOP 1421 8AC0 4A LSR A 1422 8AC1 CA DEX 1423 8AC2 D0 F0 BNE OUTC 1424 8AC4 A5 F9 LDA $F9 1425 8AC6 C9 0D CMP #$0D ;CARRIAGE RETURN? 1426 8AC8 F0 04 BEQ GOPAD ;YES-PAD IT 1427 8ACA C9 0A CMP #$0A ;PAD LINE FEED TOO 1428 8ACC D0 03 BNE LEAVE 1429 8ACE 20 32 8B GOPAD JSR PAD 1430 8AD1 4C C4 81 LEAVE JMP RESALL 14[...]
-
Page 126
1481 8B2D AD 02 A4 LDA PBDA 1482 8B30 0A ASL A 1483 8B31 60 RTS 1484 8B32 AE 50 A6 PAD LDX PADBIT ;PAD CARRIAGE RETURN OR LF 1485 8B35 20 E6 8A PAD1 JSR DLYF ;WITH EXTRA STOP BITS 1486 8B38 CA DEX 1487 8B39 D0 FA BNE PAD1 1488 8B3B 60 RTS 1489 8B3C 20 A3 89 TSTAT JSR KSCONF ;SEE IF BREAK KEY DOWN 1490 8B3F AD 02 A4 LDA PBDA 1491 8B42 2D 54 A6 AND T[...]
-
Page 127
1543 8BAF AD 54 A6 LDA TOUTFL 1544 8BB2 09 40 ORA #$40 1545 8BB4 8D 54 A6 STA TOUTFL 1546 8BB7 20 86 8B VECSW JSR ACCESS ;UN WRITE PROT RAM 1547 8BBA A2 08 LDX #$8 1548 8BBC BD 6F 8C SWLP2 LDA TRMTBL,X 1549 8BBF 9D 60 A6 STA INVEC,X 1550 8BC2 CA DEX 1551 8BC3 10 F7 BPL SWLP2 1552 8BC5 60 RTS 1553 8BC6 ; 1554 8BC6 ;*** 1555 8BC6 ;*** TABLES (I/O CON[...]
-
Page 128
1605 8BFD 45 .DB $45 ;E 1606 8BFE 46 .DB $46 ;F 1607 8BFF 0D .DB $0D ;CR 1608 8C00 2D .DB $2D ;DASH 1609 8C01 3E .DB $3E ;> 1610 8C02 FF .DB $FF ;SHIFT 1611 8C03 47 .DB $47 ;G 1612 8C04 52 .DB $52 ;R 1613 8C05 4D .DB $4D ;M 1614 8C06 13 .DB $13 ;L2 1615 8C07 1E .DB $1E ;S2 1616 8C08 ; KB UPPER CASE 1617 8C08 14 .DB $14 ;U0 1618 8C09 15 .DB $15 ;[...]
-
Page 129
1667 8C38 71 .DB $71 ;F 1668 8C39 F0 .DB $F0 ;CR 1669 8C3A 40 .DB $40 ;DASH 1670 8C3B 70 .DB $70 ;> 1671 8C3C 00 .DB $00 ;SHIFT 1672 8C3D 6F .DB $6F ;G 1673 8C3E 50 .DB $50 ;R 1674 8C3F 54 .DB $54 ;M 1675 8C40 38 .DB $38 ;L2 1676 8C41 6D .DB $6D ;S2 1677 8C42 01 .DB $01 ;U0 1678 8C43 08 .DB $08 ;U1 1679 8C44 09 .DB $09 ;U2 1680 8C45 30 .DB $30 ;[...]
-
Page 130
1729 8C78 BUFADH =$FF 1730 8C78 ;TAPDEL =$A630 ;HI SPEED TAPE DELAY 1731 8C78 ;KMBDRY =$A631 ;KIM READ BDRY 1732 8C78 ;HSBDRY =$A632 ;HS READ BDRY 1733 8C78 ;TAPET1 =$A635 ;HS FIRST 1/2 BIT 1734 8C78 ;TAPET2 =$A63C ;HS SECOND 1/2 BIT 1735 8C78 ;SCR6 =$A636 ;SCR6 1736 8C78 ;SCR7 =$8637 ;SCR7 1737 8C78 ;SCR8 =$A638 ;SCR8 1738 8C78 ;SCR9 =$A639 ;SCR9 [...]
-
Page 131
1791 8C8E 85 FD STA MODE 1792 8C90 20 26 8E JSR RDBYTX ;READ ID BYTE ON TAPE 1793 8C93 8D 00 A4 STA DIG ;DISPLAY ON LED (NOT DECODED) 1794 8C96 CD 4E A6 CMP ID ;COMPARE WITH REQUESTED ID 1795 8C99 F0 29 BEQ LOADT5 ;LOAD IF EQUAL 1796 8C9B AD 4E A6 LDA ID ;COMPARE WITH 0 1797 8C9E C9 00 CMP #0 1798 8CA0 F0 22 BEQ LOADT5 ;IF 0, LOAD ANYWAY 1799 8CA2 [...]
-
Page 132
1853 8D03 C9 2F LT7HB CMP #'/' ;EA, MUST BE "/" 1854 8D05 D0 29 BNE LCERR ;LAST CHAR NOT '/' 1855 8D07 F0 15 BEQ LT8A ;(ALWAYS) 1856 8D09 1857 8D09 ; READ KIM DATA 1858 8D09 1859 8D09 20 2A 8E LOADT7 JSR RDBYT 1860 8D0C B0 26 BCS LDT7A ;NONHEX OR LAST CHAR 1861 8D0E 20 77 8E JSR CHKT ;UPDATE CHECKSUM (PACKED BYTE) 1862[...]
-
Page 133
1915 8D69 85 F8 SY100 STA BDRY 1916 8D6B A9 6D LDA #$6D 1917 8D6D 8D 00 A4 STA DIG ;INDICATE NO SYNC ON LEDS 1918 8D70 A5 FD LDA MODE ;TURN ON OUT OF SYNC MODE 1919 8D72 09 40 ORA #$40 ;BIT6 1920 8D74 85 FD STA MODE 1921 8D76 A9 7F SYNC5 LDA #$7F ;TEST FOR CR DOWN ON HKB 1922 8D78 8D 01 A4 STA DDRDIG 1923 8D7B 2C 00 A4 BIT DIG 1924 8D7E 10 CB BPL U[...]
-
Page 134
1977 8DDE 65 F8 ADC BDRY 1978 8DE0 60 RTS 1979 8DE1 1980 8DE1 24 FD RDCHTX BIT MODE ;READ HS OR KIM CHARACTER 1981 8DE3 10 7A BPL RDCHT ;KIM 1982 8DE5 1983 8DE5 ; RDBYTH - READ HS BYTE 1984 8DE5 ; Y DESTROYED, BYTE RETURNED IN CHAR AND A 1985 8DE5 ; TIME FROM ONE CALL TO NEXT MUST BE LESS THAN 1986 8DE5 ; START BIT TIME (TIMER STILL RUNNING) 1987 8[...]
-
Page 135
2039 8E3C C9 30 PACKT CMP #$30 ;LT "0"? 2040 8E3E 90 1D BCC PACKT3 2041 8E40 C9 47 CMP #$47 ;GT "F" ? 2042 8E42 B0 19 BCS PACKT3 2043 8E44 C9 40 CMP #$40 ;A-F? 2044 8E46 F0 15 BEQ PACKT3 ;40 NOT VALID 2045 8E48 90 03 BCC PACKT1 2046 8E4A 18 CLC 2047 8E4B 69 09 ADC #9 2048 8E4D 2A PACKT1 ROL A ;GET LSD INTO LEFT NIBBLE 2049 8E4E [...]
-
Page 136
2101 8E87 20 A9 8D DUMPT JSR START ;INIT VIA & CKSUM, SA TO BUFAD & START 2102 8E8A A9 07 LDA #7 ;CODE FOR TAPE OUT 2103 8E8C 8D 02 A4 STA TAPOUT ;BIT 3 USED FOR HI/LO 2104 8E8F A2 01 LDX #1 ;KIM DELAY CONSTANT (OUTER) 2105 8E91 A4 FD LDY MODE ;128 KIM, 0 HS 2106 8E93 10 03 BPL DUMPT1 ;KIM - DO 128 SYNS 2107 8E95 AE 30 A6 LDX TAPDEL ;HS INI[...]
-
Page 137
2163 8F01 E6 FE INC BUFADL ;BUMP BUFFER ADDR 2164 8F03 D0 C9 BNE DUMPT2 2165 8F05 E6 FF INC BUFADH ;CARRY 2166 8F07 4C CE 8E JMP DUMPT2 2167 8F0A 24 FD OUTCTX BIT MODE ;HS OR KIM? 2168 8F0C 10 48 BPL OUTCHT ;KIM 2169 8F0E 2170 8F0E ; OUTBTH - NO CLOCK 2171 8F0E ; A,X DESTROYED 2172 8F0E ; MUST RESIDE ON ONE PAGE - TIMING CRITICAL 2173 8F0E A2 09 OU[...]
-
Page 138
2225 8F56 8E 38 A6 OUTCHT STX SCR8 ;PRESERVE X 2226 8F59 8C 39 A6 STY SCR9 ;DITTO Y 2227 8F5C 85 FC STA CHAR 2228 8F5E A9 FF LDA #$FF ;USE FF W/SHIFTS TO COUNT BITS 2229 8F60 48 KIMBIT PHA ;SAVE BIT CTR 2230 8F61 AD 02 A4 LDA TPOUT ;GET CURRENT OUTPUT LEVEL 2231 8F64 46 FC LSR CHAR ;GET DATA BIT IN CARRY 2232 8F66 A2 12 LDX #18 ;ASSUME 'ONE&ap[...]
-
Page 139
2287 8FB2 46 .DB $46 ;HS TAPE BOUNDARY 2288 8FB3 00 00 .DB $00,$00 ;SCR3,SCR4 2289 8FB5 33 .DB $33 ;HS TAPE FIRST 1/2 BIT 2290 8FB6 00 00 .DB $00,$00 ;SCR6,SCR7 2291 8FB8 00 00 00 00 .DB $00,$00,$00,$00 ;SCR8-SCRB 2292 8FBC 5A .DB $5A ;HS TAPE SECOND 1/2 BIT 2293 8FBD 00 00 00 .DB $00,$00,$00 ;SCRD-SCRF 2294 8FC0 00006D6E8606 .DB $00,$00,$6D,$6E,$8[...]
-
Page 140
+------------------------------------------------------------------------ | TOPIC -- AIM Computer -- AIM Monitor listing +------------------------------------------------------------------------ 0001 0000 ;TELEMARK CROSS ASSEMBLER (TASM) http://www.halcyon.com/squakvly/ 0002 0000 0003 0000 ;*************************************************** 0004 0[...]
-
Page 141
0057 00E5 END .BLOCK 2 ;LIMITS OF BUFFER (END) 0058 00E7 SAVE .BLOCK 2 ;USED BY REPLACE 0059 00E9 OLDLEN .BLOCK 1 ;ORIG LENGTH 0060 00EA LENGTH .BLOCK 1 ;NEW LENGTH 0061 00EB STRING .BLOCK 20 ;FIND STRING 0062 00FF 0063 0100 *=$0100 0064 0100 ;BREAKPOINTS AND USER I/O HANDLERS 0065 0100 BKS .BLOCK 8 ;BRK LOCATIONS 0066 0108 UIN .BLOCK 2 ;USER INPUT[...]
-
Page 142
0119 A416 CURPOS .BLOCK 1 ;PRINTER POINTER 0120 A417 CNTH30 .BLOCK 1 ;BAUD RATE &... 0121 A418 CNTL30 .BLOCK 1 ;DELAY FOR TTY 0122 A419 COUNT .BLOCK 1 ;# OF LINES (0-99) 0123 A41A S1 .BLOCK 2 ;START ADDRESS 0124 A41C ADDR .BLOCK 2 ;END ADDRESS 0125 A41E CKSUM .BLOCK 2 ;CHECKSUM 0126 A420 S2 =BKS+6 ;VERTICAL COUNT (ONLY ON DUMP) 0127 A420 0128 A[...]
-
Page 143
0181 A484 ; WRITE EDGE DETECT CONTROL (NOT USED BECAUSE KB) 0182 A484 *=$A484 0183 A484 DNPA7 .BLOCK 1 ;DISABLE PA7 INT ,NEG EDGE DET 0184 A485 DPPA7 .BLOCK 1 ;DIS PA7 INT ,POS EDGE DETE 0185 A486 ENPA7 .BLOCK 1 ;ENA PA7 INT ,NEG EDG DET 0186 A487 EPPA7 .BLOCK 1 ;ENA PA7 INT ,POS EDG DET 0187 A488 0188 A488 ; READ AND CLEAR INTERRUPT 0189 A485 *=$A[...]
-
Page 144
0243 A810 ; ****************************** 0244 A810 ; REGISTERS FOR DISPLAY (6520) 0245 AC00 *=$AC00 0246 AC00 RA .BLOCK 1 ;REGISTER A 0247 AC01 CRA .BLOCK 1 ;CONTROL REG A 0248 AC02 RB .BLOCK 1 ;REG B 0249 AC03 CRB .BLOCK 1 ;CONTROL REG B 0250 AC04 0251 AC04 ;CHR 00-03 ENA BY $AC04-AC07 0252 AC04 ;CHR 04-07 ENA BY $AC08-AC0B 0253 AC04 ;CHR 08-11 [...]
-
Page 145
0305 E000 46524F4DBD M1 .DB "FROM",EQS 0306 E005 54 4F BD M3 .DB "TO",EQS 0307 E008 202A2A2A2A20M4 .DB " **** PS AA XX YY S",$D3 0307 E00E 50532041412058582059592053D3 0308 E01C 4D4F5245BF M5 .DB "MORE",$BF 0309 E021 4F 4E A0 M6 .DB "ON",$A0 ;"ON " 0310 E024 4F 46 C6 M7 .DB "OF",[...]
-
Page 146
0363 E0C0 78 SEI ;DISABLE INTERRUPT 0364 E0C1 A2 FF LDX #$FF ;INIT STACK PTR 0365 E0C3 9A TXS 0366 E0C4 8E 24 A4 STX SAVS ;ALSO INIT SAVED STACK PTR 0367 E0C7 ;INITIALIZE 6522 0368 E0C7 A2 0E LDX #14 0369 E0C9 BD 43 E7 RS1 LDA INTAB1,X ;PB1-PB0,PA7-PA0 FOR PRNTR 0370 E0CC 9D 00 A8 STA DRB,X ;PB2=TTO,PB6=TTI 0371 E0CF CA DEX ;PB4-PB5=TAPE CONTROL,PB[...]
-
Page 147
0425 E13E 20 13 EA RS6 JSR CRLOW ;CLEAR DISPLAY 0426 E141 4C 72 FF JMP PAT21 0427 E144 A2 13 RS7 LDX #19 ;CLEAR HARDWARE CURSORS 0428 E146 8A RS8 TXA 0429 E147 48 PHA 0430 E148 A9 00 LDA #0 0431 E14A 20 7B EF JSR OUTDD1 0432 E14D 68 PLA 0433 E14E AA TAX 0434 E14F CA DEX 0435 E150 10 F4 BPL RS8 0436 E152 30 EA BMI RS6 0437 E154 0438 E154 ;BRK INSTR [...]
-
Page 148
0487 E1AC ;HAVE VALID COMMAND 0488 E1AC 8A MCM3 TXA ;CONVERT TO WORD (MULT BY 2) 0489 E1AD 0A ASL A ;2 BYTES (ADDR) 0490 E1AE AA TAX 0491 E1AF BD E5 E1 LDA MONCOM,X ;GET ADDRESS OF COMMAND PROCESSOR 0492 E1B2 8D 7D A4 STA JUMP 0493 E1B5 BD E6 E1 LDA MONCOM+1,X 0494 E1B8 8D 7E A4 STA JUMP+1 0495 E1BB 20 C1 E1 JSR JMPR ;CMD PROCESSORS CAN EXIT WITH &[...]
-
Page 149
0542 E261 ;***** G COMMAND-RESTART PROCESSOR ***** 0543 E261 20 37 E8 GO JSR PSL1 ;"/" 0544 E264 20 85 E7 JSR GCNT ;GET COUNT 0545 E267 20 F0 E9 JSR CRLF 0546 E26A 4C 86 E2 JMP GOBK1 ;RESUME EXECUTION 0547 E26D AD 0E A4 GOBK LDA REGF ;DISPLAY REGISTERS ? 0548 E270 F0 06 BEQ GOBK0 ;NO,BRANCH 0549 E272 20 32 E2 JSR REG1 ;SHOW THE SIX REG 05[...]
-
Page 150
0604 E2E0 BE 1C A4 LDX ADDR,Y 0605 E2E3 4C 42 EA JMP WRAX 0606 E2E6 0607 E2E6 ;***** L COMMAND-GENERAL LOAD ***** 0608 E2E6 ;LOAD OBJECT FROM TTY,USER,TYPE OR TAPE IN KIM-1 FORMAT 0609 E2E6 20 48 E8 LOAD JSR WHEREI ;WHERE INPUT 0610 E2E9 ;GET ";" , # OF BYTES AND SA 0611 E2E9 20 93 E9 LOAD1 JSR INALL ;GET FIRST CHAR 0612 E2EC C9 3B CMP #S[...]
-
Page 151
0666 E35F 20 BD ED JSR ADDBK1 ;JUST OUTPUT BLK CNT 0667 E362 A2 01 LDX #1 ;RESTORE X 0668 E364 ;CHECK IF FILE IS CORRECT 0669 E364 BD 16 01 LOADT2 LDA TABUFF,X ;NOW CHCK FILE NAME 0670 E367 DD 2D A4 CMP NAME-1,X 0671 E36A D0 C3 BNE LOADTA ;IF NO FILENAME GET 0672 E36C E8 INX ;ANOTHER BLOCK 0673 E36D E0 06 CPX #6 ;FILENAME=5 CHRS 0674 E36F D0 F3 BNE[...]
-
Page 152
0728 E3E5 4C D1 E3 JMP LOADK5 ;NEXT 0729 E3E8 20 FD E3 LOADK7 JSR RBYTE ;END OF DATA CMP CKSUM 0730 E3EB CD 1E A4 CMP CKSUM ;LOW 0731 E3EE D0 95 BNE CKERR 0732 E3F0 20 FD E3 JSR RBYTE 0733 E3F3 CD 1F A4 CMP CKSUM+1 ;HIGH 0734 E3F6 D0 8D BNE CKERR 0735 E3F8 68 PLA ;CORRECT RTN INSTEAD OF WHEREI 0736 E3F9 68 PLA 0737 E3FA 4C 20 E5 JMP DU13 ;TELL HIM [...]
-
Page 153
0790 E46A EE 10 A4 INC BKFLG ;SET FLG 0791 E46D ;CHCK OUTPUT DEV 0792 E46D AD 13 A4 DU1A LDA OUTFLG 0793 E470 C9 4B CMP #'K' ;TAPE FOR KIM? 0794 E472 D0 04 BNE *+6 0795 E474 68 PLA ;PULL FLG 0796 E475 4C 87 E5 JMP DUMPKI ;YES, GO OUTPUT WHOLE FILE 0797 E478 A0 01 LDY #1 ;OUTPUT ONE MORE BYTE 0798 E47A 20 CD E2 JSR NXTADD 0799 E47D 20 F0 E[...]
-
Page 154
0852 E4EE 20 BA E9 JSR SEMI ;OUTPUT ';' 0853 E4F1 A2 02 LDX #2 0854 E4F3 A9 00 LDA #0 ;OUTPUT # OF BYTES (0-LAST RECORD) 0855 E4F5 20 3B E5 JSR OUTCK1 0856 E4F8 AD 07 01 DU10A LDA S2+1 ;OUTPUT RECORD COUNT 0857 E4FB 20 3B E5 JSR OUTCK1 ;CHECKCUM IS THE SAME 0858 E4FE AD 06 01 LDA S2 0859 E501 20 3B E5 JSR OUTCK1 0860 E504 CA DEX 0861 E505[...]
-
Page 155
0914 E569 D0 03 BNE *+5 0915 E56B EE 07 01 INC S2+1 0916 E56E 60 RTS 0917 E56F 0918 E56F ;OPEN A FILE FOR OUTPUT TO TAPE BY BLOCKS 0919 E56F ;OUTPUT FILENAME GIVEN BY JSR WHEREO TO TAPE BUFF 0920 E56F A2 00 DUMPTA LDX #0 ;INITIALIZE TAPTR 0921 E571 8A TXA ;TO OUTPUT 0922 E572 8E 68 01 STX BLKO ;BLOCK COUNTER 0923 E575 8E 37 A4 STX TAPTR2 ;TAP OUTPU[...]
-
Page 156
0976 E5E9 60 RTS 0977 E5EA 0978 E5EA ;***** P COMMAND-ALTER PROCESSOR STATUS ***** 0979 E5EA A2 00 CGPS LDX #0 0980 E5EC F0 0E BEQ CGALL 0981 E5EE 0982 E5EE ;***** A COMMAND-ALTER ACCUMULATOR ***** 0983 E5EE A2 01 CGA LDX #1 0984 E5F0 D0 0A BNE CGALL 0985 E5F2 0986 E5F2 ;***** X COMMAND-ALTER X REGISTER ***** 0987 E5F2 A2 02 CGX LDX #2 0988 E5F4 D0[...]
-
Page 157
1038 E64F 20 13 EA JSR CRLOW 1039 E652 20 3E E8 SH1 JSR BLANK 1040 E655 BE 00 01 LDX BKS,Y ;ADDRESS OF NEXT BREAKPOINT 1041 E658 B9 01 01 LDA BKS+1,Y 1042 E65B 20 42 EA JSR WRAX ;SHOW BREAKPOINT ADDRESS 1043 E65E C8 INY 1044 E65F C8 INY 1045 E660 C0 08 CPY #8 1046 E662 D0 EE BNE SH1 1047 E664 60 RTS 1048 E665 1049 E665 ;***** H COMMAND-SHOW TRACE S[...]
-
Page 158
1100 E6C9 D0 2F BNE BRK4 ;IF $10 TAPE CNTRL IS OFF 1101 E6CB 1102 E6CB ;***** 2 COMMAND-TOGGLE TAPE 2 CONTROL ***** 1103 E6CB AD 00 A8 TOGTA2 LDA DRB 1104 E6CE 49 20 EOR #$20 ;INVERT PB5 1105 E6D0 8D 00 A8 STA DRB 1106 E6D3 29 20 AND #$20 1107 E6D5 F0 1A BEQ BRK3 1108 E6D7 D0 21 BNE BRK4 1109 E6D9 1110 E6D9 ;***** V COMMAND-TOGGLE REGISTER DISP FLG[...]
-
Page 159
1162 E732 65 EA ADC LENGTH 1163 E734 8D 25 A4 STA SAVPC 1164 E737 90 03 BCC JD3 1165 E739 EE 26 A4 INC SAVPC+1 1166 E73C 20 24 EA JD3 JSR CRCK ;<CR> 1167 E73F 4C 23 E7 JMP JD1 1168 E742 60 JD4 RTS 1169 E743 1170 E743 ;INITIALIZATION TABLE FOR 6522 1171 E743 340037FF25FFINTAB1 .DB $34,$00,$37,$FF,$25,$FF,$25,$FF 1171 E749 25FF 1172 E74B FF FF [...]
-
Page 160
1221 E7A9 20 AF E7 TO1 JSR KEP 1222 E7AC 4C B1 EA JMP ADDNE ;GET ADDRESS 1223 E7AF 1224 E7AF ;PRINT MSG POINTED TO BY Y REG 1225 E7AF B9 00 E0 KEP LDA M1,Y 1226 E7B2 48 PHA 1227 E7B3 29 7F AND #$7F ;STRIP OFF MSB 1228 E7B5 20 7A E9 JSR OUTPUT 1229 E7B8 C8 INY 1230 E7B9 68 PLA 1231 E7BA 10 F3 BPL KEP ;MSB =1 ? 1232 E7BC 60 RTS 1233 E7BD 1234 E7BD ;P[...]
-
Page 161
1283 E81E 8D 16 A4 PSL0C STA CURPOS 1284 E821 A2 00 LDX #0 1285 E823 B9 38 A4 PSL0D LDA DIBUFF,Y ;TRANSFER THEM 1286 E826 9D 60 A4 STA IBUFM,X 1287 E829 E8 INX 1288 E82A C8 INY 1289 E82B EC 16 A4 CPX CURPOS ;PRI PNTR 1290 E82E 90 F3 BCC PSL0D 1291 E830 20 38 F0 JSR OUTPR ;CLR PRI BUFF TO THE RIGHT 1292 E833 20 AC EB JSR PLXY ;RESTORE X,Y 1293 E836 [...]
-
Page 162
1345 E892 A9 0D LDA #CR ;OUTPUT LAST LINE IF ON 1346 E894 4C 00 F0 JMP OUTPRI ;& CLEAR PRINTER PTR 1347 E897 ;USER SET UP 1348 E897 C9 55 WHRO3 CMP #'U' ;USR RTN? 1349 E899 D0 04 BNE WHRO4 1350 E89B 18 CLC ;CLR FLG FOR INITIALIZATION 1351 E89C 6C 0A 01 JMP (UOUT) ;USER OUTPUT SETUP 1352 E89F ;ANY OTHER 1353 E89F 4C 13 EA WHRO4 JMP CRL[...]
-
Page 163
1407 E901 A9 0D OUTLOW LDA #CR 1408 E903 8D 13 A4 STA OUTFLG 1409 E906 60 OUTL1 RTS 1410 E907 1411 E907 ;ON <ESCAPE> STOPS EXECUTION & BACK TO MONITOR 1412 E907 ;ON <SPACE> STOPS EXECUTION & CONTINUE ON ANY OTHER KEY 1413 E907 20 42 E8 RCHEK JSR TTYTST ;TTY OR KB ? 1414 E90A F0 1A BEQ RCHTTY 1415 E90C 20 EF EC JSR ROONEK ;CLR MS[...]
-
Page 164
1469 E973 ;READ AND ECHO A CHAR FROM KB OR TTY 1470 E973 20 83 FE REDOUT JSR CUREAD 1471 E976 C9 0D RED2 CMP #CR 1472 E978 F0 C1 BEQ RCHT1 ;DO NOT ECHO <CR> 1473 E97A 1474 E97A ;OUTPUTS A CHAR TO EITHER TTY OR D/P 1475 E97A 48 OUTPUT PHA ;SAVE IT 1476 E97B AD 11 A4 OUT1 LDA PRIFLG ;IF LSB=1 OUTPUT ONLY TO DISP 1477 E97E 29 01 AND #$01 1478 E9[...]
-
Page 165
1531 E9DE 2E 11 A4 ROL PRIFLG ;RESTORE FLG 1532 E9E1 60 RTS 1533 E9E2 ;USER DEFINED 1534 E9E2 C9 55 OUTA3 CMP #'U' ;USER ROUTINE? 1535 E9E4 D0 04 BNE OUTA4 1536 E9E6 38 SEC ;SET FLG FOR NORMAL OUTPUT 1537 E9E7 6C 0A 01 JMP (UOUT) ;YES 1538 E9EA ;NOWHERE OR TO TTY ,D/P 1539 E9EA C9 58 OUTA4 CMP #'X' ;EAT IT? 1540 E9EC D0 8D BNE O[...]
-
Page 166
1593 EA42 20 46 EA WRAX JSR NUMA 1594 EA45 8A TXA 1595 EA46 1596 EA46 ;PRINT ONE BYTE=TWO ASCII CHARS TO OUTPUT DEVICE 1597 EA46 48 NUMA PHA 1598 EA47 4A LSR A 1599 EA48 4A LSR A 1600 EA49 4A LSR A 1601 EA4A 4A LSR A 1602 EA4B 20 51 EA JSR NOUT 1603 EA4E 68 PLA 1604 EA4F 29 0F AND #$F 1605 EA51 18 NOUT CLC 1606 EA52 69 30 ADC #'0' 1607 EA[...]
-
Page 167
1655 EAA3 CA DEX 1656 EAA4 D0 F9 BNE PAK2 1657 EAA6 AE 2D A4 LDX CPIY+3 ;REST X 1658 EAA9 AD 29 A4 LDA STIY+2 1659 EAAC 18 CLC 1660 EAAD 60 RTS 1661 EAAE 1662 EAAE ;GET FOUR BYTE ADDR ,TAKE LAST FOUR CHR TO... 1663 EAAE ;CALCULATE ADDR .ALLOW DELETE ALSO 1664 EAAE 20 D8 E7 ADDIN JSR EQUAL 1665 EAB1 AD 15 A4 ADDNE LDA CURPO2 ;SAVE POSITION 1666 EAB4[...]
-
Page 168
1717 EB15 C8 INY 1718 EB16 B9 1C A4 LDA ADDR,Y 1719 EB19 C8 INY 1720 EB1A 20 84 EA JSR PACK ;PACK TWO CHRS INTO 1 BYTE 1721 EB1D B0 0C BCS ADDN8 ;BRCNH IF ERROR 1722 EB1F 9D 1C A4 STA ADDR,X 1723 EB22 CA DEX 1724 EB23 10 E8 BPL ADDN7 1725 EB25 E8 INX ;X=0 1726 EB26 8E 1E A4 STX CKSUM ;TO INDICATE WE GOT AN ADDR 1727 EB29 18 CLC ;NO INVALID CHARS 17[...]
-
Page 169
1779 EB85 8D 29 A4 STA STIY+2 1780 EB88 8D 2C A4 STA CPIY+2 1781 EB8B A9 99 LDA #$99 ;STA INSTR 1782 EB8D 8D 27 A4 STA STIY 1783 EB90 A9 D9 LDA #$D9 ;CMP INSTR 1784 EB92 8D 2A A4 STA CPIY 1785 EB95 A9 60 LDA #$60 ;RTS 1786 EB97 8D 2D A4 STA LDIY+3 1787 EB9A 68 PLA 1788 EB9B 4C 27 A4 JMP STIY ;START EXECUTING STA (),Y 1789 EB9E 1790 EB9E ;PUSH X &am[...]
-
Page 170
1841 EBEA 20 23 EC JSR DEHALF ;DELAY 1/2 BIT TIME 1842 EBED AD 00 A8 GET3 LDA DRB ;GET 8 BITS 1843 EBF0 29 40 AND #$40 ;MASK OFF OTHER BITS,ONLY PB6 1844 EBF2 4E 2A A4 LSR CPIY ;SHIFT RIGHT CHARACTER 1845 EBF5 0D 2A A4 ORA CPIY 1846 EBF8 8D 2A A4 STA CPIY 1847 EBFB 20 0F EC JSR DELAY ;DELAY 1 BIT TIME 1848 EBFE CA DEX 1849 EBFF D0 EC BNE GET3 ;GET [...]
-
Page 171
1903 EC5E 4A LSR A ;ONLY ROW 1 1904 EC5F 90 06 BCC GETK00 ;GOT YOU 1905 EC61 68 PLA 1906 EC62 CA DEX 1907 EC63 D0 F0 BNE GETK0 1908 EC65 F0 DC BEQ GETKY ;THERE IS A MISTAKE CHECK AGAIN 1909 EC67 68 GETK00 PLA ;NOW GET STBKEY INTO X 1910 EC68 AD 2B A4 LDA STBKEY ;CLMN INTO X 1911 EC6B 49 FF EOR #$FF ;COMPLEMENT BECAUSE STRBS ARE 0 1912 EC6D AA TAX ;[...]
-
Page 172
1965 ECC3 E0 00 CPX #0 ;IF SHIFT IS NOT ADV PAPER 1966 ECC5 F0 25 BEQ GETK10 ;NO SHIFT ,SO ADVPAPER 1967 ECC7 29 4F AND #$4F ;CONVRT TO "@" 1968 ECC9 C9 1C GETK11 CMP #$1C ;SEE IF TOGGL PRIFLG (CONTRL PRI) 1969 ECCB D0 14 BNE GETK13 1970 ECCD 20 E1 E6 JSR PRITR ;GO TOGGLE FLG 1971 ECD0 A0 01 LDY #1 ;GET THE PTRS BACK 3 SPACES 1972 ECD2 B9[...]
-
Page 173
2027 ED3B ;GET A CHAR FROM TAPE SUBROUTINE 2028 ED3B ;A BUFFER IS USED TO GET BLOCKS OF DATA 2029 ED3B ;FROM TAPE ,EXCEPT WHEN FORMAT EQUAL TO 2030 ED3B ;KIM-1 (THE WHOLE FILE IS LOADED AT ONE TIME) 2031 ED3B 20 9E EB TIBYTE JSR PHXY ;PUSH X 2032 ED3E AE 36 A4 LDX TAPTR ;POINTER FOR BUFFER 2033 ED41 E0 50 CPX #80 ;IS BUFFER EMPTY ? 2034 ED43 D0 03 [...]
-
Page 174
2089 EDB7 4C A1 E1 JMP COMIN 2090 EDBA 2091 EDBA ;ADD 1 TO BLK COUNT AND OUTPUT IT 2092 EDBA EE 15 01 ADDBLK INC BLK ;INCR BLK CNT 2093 EDBD EE 11 A4 ADDBK1 INC PRIFLG ;SO DONT OUTPUT TO PRINTR 2094 EDC0 A9 12 LDA #18 ;ONLY OUTPUT IN THIS POSITION 2095 EDC2 8D 15 A4 STA CURPO2 2096 EDC5 AD 4A A4 LDA DIBUFF+18 ;SAVE DISBUF (FOR EDIT) 2097 EDC8 48 PH[...]
-
Page 175
2151 EE2E 4E 2A A4 LSR CPIY ;MAKE ROOM FOR MSB 2152 EE31 0D 2A A4 ORA CPIY ;OR IN SIGN BIT 2153 EE34 8D 2A A4 STA CPIY ;REPLACE CHAR 2154 EE37 88 DEY 2155 EE38 D0 F1 BNE GETA1 2156 EE3A 60 RTS 2157 EE3B ;GET ONE BIT FROM TAPE AND 2158 EE3B ;RETURN IT IN SIGN OF A (MSB) 2159 EE3B AD 08 A4 RDBIT LDA TSPEED ;ARE WE IN C7 OR 5B,5A FREQUENC` 2160 EE3E 3[...]
-
Page 176
2213 EEA4 30 FB BMI CKF4 2214 EEA6 10 D9 BPL CKF2 ;GO GET TIMING 2215 EEA8 2216 EEA8 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2217 EEA8 ;OUTPUT ACC TO TTY SUBROUTINE 2218 EEA8 ;X,Y ARE PRESERVED 2219 EEA8 48 OUTTTY PHA ;SAVE A 2220 EEA9 20 9E EB JSR PHXY ;PUSH X 2221 EEAC 8D 27 A4 STA STIY ;PUT CHAR HERE 2222 EEAF 20 0F EC JSR DELAY ;[...]
-
Page 177
2275 EF17 E0 3C OUTD1A CPX #60 ;LAST CHAR FOR DISP? 2276 EF19 90 05 BCC OUTD2 2277 EF1B 20 AC EB JSR PLXY ;GO BACK 2278 EF1E 68 PLA ;DO NOT STORE 2279 EF1F 60 RTS 2280 EF20 9D 38 A4 OUTD2 STA DIBUFF,X ;PUT CHAR IN BUFF 2281 EF23 EE 15 A4 INC CURPO2 ;INC POINTER 2282 EF26 E0 14 CPX #20 ;DISPLAY FULL? 2283 EF28 90 1E BCC OUTD4 2284 EF2A 20 2F EF JSR [...]
-
Page 178
2337 EF81 A9 04 LDA #4 ;FIRST CHIP SELECT 2338 EF83 E0 00 CPX #0 ;FIRST CHIP ? 2339 EF85 F0 04 BEQ OUTDD3 2340 EF87 0A OUTDD2 ASL A 2341 EF88 CA DEX 2342 EF89 D0 FC BNE OUTDD2 ;BACK TILL RIGH CS 2343 EF8B 8D 28 A4 OUTDD3 STA STIY+1 ;SAVE CS TEMPORARILY 2344 EF8E 68 PLA ;GET X AGAIN FOR CHAR 2345 EF8F 29 03 AND #$03 ;IN THAT CHIP 2346 EF91 0D 28 A4 [...]
-
Page 179
2399 F036 68 PLA 2400 F037 60 RTS 2401 F038 A9 20 OUTPR LDA #' ' ;FILL REST OF BUFF WITH BLANKS 2402 F03A E0 14 OUTPR1 CPX #20 ;SEE IF END OF BUFF 2403 F03C F0 06 BEQ OUTPR2 2404 F03E 9D 60 A4 STA IBUFM,X ;NO SO STORE BLANK 2405 F041 E8 INX ;INCR BUFF PNTR 2406 F042 10 F6 BPL OUTPR1 2407 F044 60 OUTPR2 RTS 2408 F045 2409 F045 ;SUB TO OUTP[...]
-
Page 180
2461 F0B2 A9 06 LDA #PRTIME/256 ;START T2 FOR 1.7 MSEC 2462 F0B4 8D 09 A8 STA T2H 2463 F0B7 20 E3 F0 JSR IPSU ;SET NEXT PATTERN WHILE WAITING 2464 F0BA 20 1B EC JSR DE2 ;WAIT TILL TIME OUT 2465 F0BD A9 00 LDA #0 ;THERMAL ELEM OFF 2466 F0BF 8D 01 A8 STA DRAH 2467 F0C2 AD 00 A8 LDA DRB ;BUT DONT CHANGE TAPE CONTROLS 2468 F0C5 29 FC AND #$FC 2469 F0C7[...]
-
Page 181
2523 F0F0 20 58 EB JSR LDAY 2524 F0F3 2C 7C A4 BIT IMASK ;SEE IF DOT IS SET 2525 F0F6 F0 16 BEQ IPS2 ;NO SO GO ON TO NEXT CHAR 2526 F0F8 AD 7A A4 LDA IBITL ;DOT ON SO SET THE CURR SOLENOID 2527 F0FB F0 08 BEQ IPS3 ;LSB OF SOL MASK IS 0 , DO MSB 2528 F0FD 0D 78 A4 ORA IOUTL ;SET THE SOLENOID IN THE PATTERN 2529 F100 8D 78 A4 STA IOUTL 2530 F103 D0 0[...]
-
Page 182
2585 F15D DE 74 A4 OP06 DEC IDIR,X ;DIRECTION <= $FF (-) 2586 F160 2587 F160 ;START OF NEW PRINT ROW 2588 F160 1E 7C A4 NEWROW ASL IMASK,X ;UPDATE ROW MASK FOR DOT PATTERNS 2589 F163 ;START OF NEW PRINT COLUMN 2590 F163 A9 00 NEWCOL LDA #0 ;CLEAR OUTPUT PATTERN 2591 F165 9D 78 A4 STA IOUTL,X ;PATTERN FOR 8 RIGHT CHRS 2592 F168 9D 79 A4 STA IOUTU[...]
-
Page 183
2647 F1D2 ;CHCK ACTIVE BUFFER AND LOAD A CHR 2648 F1D2 ;CARRY=0 IF ONLY 1 BUFFER ,C=1 IF 2 BUFFERS 2649 F1D2 AD 12 A4 CKBUFF LDA INFLG 2650 F1D5 CD 13 A4 CMP OUTFLG 2651 F1D8 D0 08 BNE CBUFF1 2652 F1DA C9 54 CMP #'T' ;SEE IF INFLG=OUTFLG = T 2653 F1DC D0 04 BNE CBUFF1 2654 F1DE 38 SEC ;USE PAGE 1 FOR OUTPUT BUFFER 2655 F1DF B5 AD LDA TABU[...]
-
Page 184
2709 F24A ;OUTPUT ACC TO TAPE 2710 F24A 8E 2D A4 OUTTAP STX CPIY+3 ;SAVE X 2711 F24D A0 07 LDY #$07 ;FOR THE 8 BITS 2712 F24F 8C 27 A4 STY STIY 2713 F252 AE 08 A4 LDX TSPEED 2714 F255 30 39 BMI OUTTA1 ;IF ONE IS SUPER HIPER 2715 F257 48 PHA 2716 F258 A0 02 TRY LDY #2 ;SEND 3 UNITS 2717 F25A 8C 28 A4 STY STIY+1 ;STARTING AT 3700 HZ 2718 F25D BE 0A A[...]
-
Page 185
2771 F2C4 A9 0C LDA #12 2772 F2C6 90 02 BCC SETSP1 2773 F2C8 A9 04 LDA #4 2774 F2CA 8D 0A A4 SETSP1 STA NPUL 2775 F2CD A9 12 LDA #18 2776 F2CF 90 02 BCC SETSP2 2777 F2D1 A9 06 LDA #6 2778 F2D3 8D 0C A4 SETSP2 STA TIMG+1 2779 F2D6 60 RTS 2780 F2D7 ;.FILE A3/2 2781 F2D7 2782 F2D7 ; ADDRESS TABLE FOR EACH PRINT COLUMN 2783 F2D7 ; EACH TBL CONTAINS DOT[...]
-
Page 186
2813 F379 087849410841 .DB $08,$78,$49,$41,$08,$41,$01,$40 ;X -- ( 2813 F37F 0140 2814 F381 004F00147F08 .DB $00,$4F,$00,$14,$7F,$08,$59,$02 ; -- ' 2814 F387 5902 2815 F389 22223E3E0008 .DB $22,$22,$3E,$3E,$00,$08,$00,$08 ;( -- / 2815 F38F 0008 2816 F391 497F51491245 .DB $49,$7F,$51,$49,$12,$45,$49,$09 ;0 -- 7 2816 F397 4909 2817 F399 49494400[...]
-
Page 187
2846 F45F 5D5B 2847 F461 2848 F461 ;DISASSEMBLE INSTRUCTIONS AND SHOW REGS IS REGF SET 2849 F461 AD 0E A4 REGQ LDA REGF ;GET FLAG 2850 F464 F0 06 BEQ DISASM 2851 F466 20 32 E2 JSR REG1 ;SHOW THE SIX REGS 2852 F469 20 24 EA JSR CRCK ;<CR> 2853 F46C 2854 F46C 20 45 F5 DISASM JSR PRBL2 2855 F46F 20 3C F5 JSR PRPC ;OUTPUT PROG COUNTR 2856 F472 A0[...]
-
Page 188
2908 F4CC 8D 17 01 STA LMNEM 2909 F4CF B9 F9 F5 LDA MNEMR,Y 2910 F4D2 8D 18 01 STA RMNEM 2911 F4D5 A2 03 LDX #3 ;MUST BE 2912 F4D7 A9 00 PRMN1 LDA #0 2913 F4D9 A0 05 LDY #5 2914 F4DB 0E 18 01 PRMN2 ASL RMNEM 2915 F4DE 2E 17 01 ROL LMNEM 2916 F4E1 2A ROL A 2917 F4E2 88 DEY 2918 F4E3 D0 F6 BNE PRMN2 2919 F4E5 69 BF ADC #'?'+$80 ;ADD "?[...]
-
Page 189
2970 F550 AA TAX 2971 F551 10 01 BPL PCADJ4 2972 F553 88 DEY 2973 F554 6D 25 A4 PCADJ4 ADC SAVPC ;PROG CNTR LOW 2974 F557 90 01 BCC RTS1 2975 F559 C8 INY 2976 F55A 60 RTS1 RTS 2977 F55B 2978 F55B 40024503D008MODE .DB $40,2,$45,3,$D0,8,$40,9 2978 F561 4009 2979 F563 30224533D008 .DB $30,$22,$45,$33,$D0,8,$40,9 2979 F569 4009 2980 F56B 40024533D008 .[...]
-
Page 190
3011 F621 4468B232B200 .DB $44,$68,$B2,$32,$B2,0,$22,0 3011 F627 2200 3012 F629 1A1A26267272 .DB $1A,$1A,$26,$26,$72,$72,$88,$C8 3012 F62F 88C8 3013 F631 C4CA26484444 .DB $C4,$CA,$26,$48,$44,$44,$A2,$C8 3013 F637 A2C8 3014 F639 3015 F639 ;******************************* 3016 F639 ;*** AIM TEXT EDITOR *** 3017 F639 ;*** 05/01/78 *** 3018 F639 ;*****[...]
-
Page 191
3070 F692 A5 E6 LDA END+1 ;CMP WITH END 3071 F694 CD 1D A4 CMP ADDR+1 3072 F697 F0 11 BEQ EDI7 3073 F699 B0 13 BCS EDI8 3074 F69B 20 BC F8 EDI6 JSR TOPNO ;RESTORE NOWLN 3075 F69E A9 00 LDA #0 3076 F6A0 91 DF STA (NOWLN),Y ;END OF TEXT MARKER 3077 F6A2 20 13 EA JSR CRLOW 3078 F6A5 A9 52 LDA #'R' ;FORCE READ COMMAND 3079 F6A7 4C 8D FA JMP E[...]
-
Page 192
3132 F706 4C AF E7 JMP KEP 3133 F709 A0 00 UPNO LDY #0 3134 F70B 20 E9 F8 JSR ATBOT 3135 F70E 90 03 BCC UP1 3136 F710 4C 5C FA JMP ENDERR 3137 F713 B1 DF UP1 LDA (NOWLN),Y 3138 F715 F0 09 BEQ UP4 3139 F717 C8 INY 3140 F718 C9 0D CMP #CR 3141 F71A D0 F7 BNE UP1 3142 F71C 98 TYA 3143 F71D 20 2A F9 JSR ADDA ;ADD LENGTH TO CURRENT LINE 3144 F720 60 UP4[...]
-
Page 193
3194 F780 C9 7F CMP #$7F ;RUB 3195 F782 4C 2A FF JMP PATC17 ;NO ZEROS IN CASE OF PAPER TAPE 3196 F785 C9 0A IN02A CMP #LF 3197 F787 F0 F1 BEQ IN02 3198 F789 C9 0D CMP #CR 3199 F78B F0 1B BEQ IN03 3200 F78D C0 3C CPY #60 ;DO NOT INCR Y IF 60 3201 F78F B0 08 BCS IN03B 3202 F791 99 38 A4 STA DIBUFF,Y 3203 F794 C8 INY 3204 F795 C0 3C CPY #60 3205 F797 [...]
-
Page 194
3256 F80C ;***** F COMMAND-FIND STRING ***** 3257 F80C ;FIND STRING AND PRINT LINE TO TERMINAL 3258 F80C 20 1E F8 FCHAR JSR FCH 3259 F80F AD 15 A4 FCHA1 LDA CURPO2 ;SAVE BUFFER PNTR 3260 F812 48 PHA 3261 F813 20 44 EB JSR CLR ;CLEAR DISP PNTR 3262 F816 20 27 F7 JSR PLNE 3263 F819 68 PLA 3264 F81A 8D 15 A4 STA CURPO2 3265 F81D 60 RTS 3266 F81E ;FIND[...]
-
Page 195
3318 F889 4C 7C F8 JMP CHN1 3319 F88C AD 29 A4 CHN2 LDA STIY+2 ;GET CHAR COUNT 3320 F88F 85 E9 STA OLDLEN ;GET READY FOR REPLAC 3321 F891 AD 15 A4 LDA CURPO2 ;PNTR TO BEGINNING OF STRING 3322 F894 48 PHA ;SAVE IT 3323 F895 20 2A F9 JSR ADDA ;ADD TO NOWLN (LINE PNTR) 3324 F898 20 44 EB JSR CLR ;CLEAR DISP 3325 F89B A0 05 LDY #M3-M1 ;PRINT "TO&q[...]
-
Page 196
3380 F8F6 60 RTS 3381 F8F7 18 AT01 CLC 3382 F8F8 60 RTS 3383 F8F9 3384 F8F9 ;SEE IF WE RAN PAST END OF BUFFER LIMIT 3385 F8F9 A5 E1 ATEND LDA BOTLN 3386 F8FB A6 E2 LDX BOTLN+1 3387 F8FD E4 E6 CPX END+1 ;HIGH BYTE > OR = ? 3388 F8FF 90 F6 BCC AT01 3389 F901 D0 F2 BNE AT02 3390 F903 C5 E5 CMP END ;LOW BYTE > OR = ? 3391 F905 90 F0 BCC AT01 3392[...]
-
Page 197
3442 F951 F0 EB BEQ REP2 3443 F953 B9 38 A4 R88 LDA DIBUFF,Y 3444 F956 91 DF STA (NOWLN),Y 3445 F958 20 4A FA JSR GOGO 3446 F95B 88 DEY 3447 F95C 10 F5 BPL R88 3448 F95E 60 RTS 3449 F95F B0 6E R2W BCS R100 ;LENGTH > OLDLEN 3450 F961 3451 F961 ;LENGTH < OLDLEN 3452 F961 20 34 F9 JSR SAVNOW ;PUT NOWLN INTO ADDR 3453 F964 20 10 F9 JSR ADDRS1 ;PU[...]
-
Page 198
3504 F9D1 38 SEC 3505 F9D2 E5 E9 SBC OLDLEN 3506 F9D4 A4 E9 LDY OLDLEN 3507 F9D6 D0 02 BNE R101 ;ALREADY HAVE ROOM FOR CR 3508 F9D8 69 00 ADC #0 ;ADD ONE TO DIFFERENCE 3509 F9DA 48 R101 PHA 3510 F9DB 20 34 F9 JSR SAVNOW ;NOWLN INTO S1 3511 F9DE 20 C5 F8 JSR SETBOT 3512 F9E1 A0 00 LDY #0 3513 F9E3 B1 DF R102 LDA (NOWLN),Y 3514 F9E5 C9 00 CMP #0 3515[...]
-
Page 199
3566 FA55 8D 1D A4 STA ADDR+1 3567 FA58 4C 33 EB JMP MEMERR 3568 FA5B 60 GOGO1 RTS ;OK 3569 FA5C 3570 FA5C 20 44 EB ENDERR JSR CLR ;CLEAR PNTR 3571 FA5F A0 72 LDY #EMSG2-M1 ;PRINT "END" 3572 FA61 20 AF E7 JSR KEP 3573 FA64 20 D8 F6 JSR DNNO ;BACK UP TO LAST LINE 3574 FA67 20 42 E8 JSR TTYTST ;IF TTY <CR> 3575 FA6A D0 03 BNE ENDE2 35[...]
-
Page 200
3625 FAE2 3626 FAE2 ;ROM TABLE LOCATIONS: 3627 FAE2 00020008F2FFTYPTR1 .DB 00,02,00,08,$F2,$FF,$80,01 3627 FAE8 8001 3628 FAEA C0E2C0C0FF00 .DB $C0,$E2,$C0,$C0,$FF,00,00 3628 FAF0 00 3629 FAF1 0800108040C0TYPTR2 .DB 08,00,$10,$80,$40,$C0,00,$C0 3629 FAF7 00C0 3630 FAF9 00400000E420 .DB $00,$40,00,00,$E4,$20,$80 3630 FAFF 80 3631 FB00 00FC000808F8CO[...]
-
Page 201
3663 FBB8 20 3B E8 JSR BLANK2 3664 FBBB 20 3B E8 JSR BLANK2 3665 FBBE 4C 06 FE JMP MNEM ;JUMP TO INPUT MNEMONIC OPCODE 3666 FBC1 A9 00 MODEM LDA #00 ;SET UP TO FORM MODE MATCH 3667 FBC3 8D 26 01 STA TMASK1 3668 FBC6 8D 27 01 STA TMASK2 3669 FBC9 20 3E E8 JSR BLANK 3670 FBCC AC 2E 01 LDY TYPE 3671 FBCF 38 SEC 3672 FBD0 6E 26 01 PNTLUP ROR TMASK1 ;SH[...]
-
Page 202
3725 FC3A 4C CB FC JMP OPCOMP 3726 FC3D 4C B6 FC HATCJ JMP HATCH 3727 FC40 A9 04 TRY34 LDA #04 ;CHECK FOR ABSOLUTE OR ZP,X ORZP,` 3728 FC42 CD 31 A4 CMP TEMPX 3729 FC45 90 15 BCC ABSIND 3730 FC47 A2 02 LDX #02 3731 FC49 20 F1 FD JSR XORYZ ;CC = X, CS = Y, NE = ABSOLUTE 3732 FC4C D0 58 BNE ABSOL 3733 FC4E 90 05 BCC ZPX 3734 FC50 A2 03 ZPY LDX #03 ;C[...]
-
Page 203
3787 FCC3 D0 06 BNE OPCOMP 3788 FCC5 20 94 E3 ERRORM JSR CKER00 ;OUTPUT ERROR MESSAGE 3789 FCC8 4C AA FB JMP STARTM 3790 FCCB 3791 FCCB ;COMPUTE FINAL OP CODE FOR DEFINED ADDRESING MODE 3792 FCCB BD E2 FA OPCOMP LDA TYPTR1,X ;MATCH TYPE MASK WITH VALID MODE 3793 FCCE F0 05 BEQ OPCMP1 ;PATTERNS & SKIP 1ST WORD TEST IF 3794 FCD0 2D 26 01 AND TMAS[...]
-
Page 204
3849 FD38 F0 0B BEQ FORMDS 3850 FD3A 88 DEY 3851 FD3B B8 CLV 3852 FD3C 50 F2 BVC STSHLP ;REPEAT TILL THRU 3853 FD3E 3854 FD3E A9 01 ONEBYT LDA #01 ;SET BYTES = 1 3855 FD40 8D 2F A4 STA BYTESM 3856 FD43 D0 E7 BNE STASH 3857 FD45 3858 FD45 ;FORMAT FOR SYSTEM 65 DISPLAY (REFORMAT FOR AIM) 3859 FD45 20 44 EB FORMDS JSR CLR 3860 FD48 20 DD E5 JSR CGPC1 [...]
-
Page 205
3911 FDBB 38 CMPBR1 SEC ;COMPUTE BRANCH RELATIVE ADDRESS 3912 FDBC AD 35 A4 LDA OPCODE+1 3913 FDBF ED 26 01 SBC MOVAD 3914 FDC2 8D 35 A4 STA OPCODE+1 3915 FDC5 AD 36 A4 LDA OPCODE+2 3916 FDC8 ED 27 01 SBC MOVAD+1 3917 FDCB 8D 36 A4 STA OPCODE+2 3918 FDCE C9 00 CMP #00 3919 FDD0 F0 0E BEQ FORWRD 3920 FDD2 C9 FF CMP #$FF 3921 FDD4 F0 03 BEQ BACKWD 39[...]
-
Page 206
3973 FE33 A2 05 LDX #05 ;SET UP INNER LOOP 3974 FE35 4A INLUP LSR A ;SHIFT 5 BITS ACC TO MOVAD,MOVAD+1 3975 FE36 6E 26 01 ROR MOVAD 3976 FE39 6E 27 01 ROR MOVAD+1 3977 FE3C CA DEX 3978 FE3D D0 F6 BNE INLUP 3979 FE3F 88 DEY 3980 FE40 D0 EE BNE OUTLUP 3981 FE42 3982 FE42 ;SEARCH FOR MATCHING COMPRESSED CODE 3983 FE42 A2 40 LDX #$40 3984 FE44 AD 26 01[...]
-
Page 207
4035 FE9C AE 15 A4 PATCH4 LDX CURPO2 ;DONT DO ANYTHING IF "8D" 4036 FE9F C9 8D CMP #CR+$80 ;SO <CR> FOR TV & NOT FOR DISP 4037 FEA1 D0 0B BNE PAT4A 4038 FEA3 A9 A0 LDA #' '+$80 ;CLR CURSOR 4039 FEA5 20 7B EF JSR OUTDD1 4040 FEA8 20 44 EB JSR CLR ;CLR PNTRS 4041 FEAB 4C 76 EF JMP OUTD7 ;EXIT 4042 FEAE 4C 17 EF PAT4A JMP[...]
-
Page 208
4097 FF14 4C 0A E5 JMP DU11 4098 FF17 4099 FF17 20 F0 E9 PATC15 JSR CRLF ;DECODE COMMAND 4100 FF1A 8A TXA ;SAVE INDEX 4101 FF1B 0A ASL A 4102 FF1C AA TAX 4103 FF1D BD B8 FA LDA JTBL,X ;PART OF ENTRY 4104 FF20 8D 1A A4 STA S1 4105 FF23 60 RTS 4106 FF24 4107 FF24 20 DD E5 PATC16 JSR CGPC1 ;ADDR TO PC 4108 FF27 4C AA FB JMP STARTM ;BACK TO MNEMONIC ST[...]
-
Page 209
4158 FF99 00 .DB 0 4159 FF9A 4160 FF9A EE 68 01 PAT22 INC BLKO 4161 FF9D 4C BD ED JMP ADDBK1 4162 FFA0 4163 FFA0 A9 FF PAT23 LDA #$FF ;START TIMER 4164 FFA2 8D 97 A4 STA DI1024 4165 FFA5 AD 85 A4 PAT23A LDA RINT ;TIME OUT? 4166 FFA8 30 08 BMI PAT23B ;YES 4167 FFAA AD 0D A8 LDA IFR ;START SIGNAL? 4168 FFAD 29 10 AND #MPRST 4169 FFAF F0 F4 BEQ PAT23A[...]
-
Page 210
COUNT A419 CKSUM A41E CPIY A42A CRA AC01 CRB AC03 CR 000D COMIN E1A1 COMB E1C4 CHNGG E2A0 CHNG1 E2A6 CH2 E2B8 CH4 E2C0 CH3 E2C5 CKERR E385 CKER0 E38E CKER00 E394 CKER1 E396 CKER2 E3A3 CHEKAR E54B CHEKA E54E CGPC E5D4 CGPC0 E5D7 CGPC1 E5DD CGPS E5EA CGA E5EE CGX E5F2 CGY E5F6 CGS E5FA CGALL E5FC CLRBK E6FE CKB E76B CKB2 E76D CKB1 E780 CRLF E9F0 CRLO[...]
-
Page 211
GID1 E427 GOERR E608 GCNT E785 GCN1 E78C GETTTY EBDB GET1 EBE2 GET3 EBED GETKD0 EC38 GETKEY EC40 GETKY EC43 GETK0 EC55 GETK00 EC67 GETK1 EC71 GETK1B EC80 GETK2 EC82 GETK3 EC8D GETK4 EC93 GETK5 ECA4 GETK6 ECB9 GETK7 ECBE GETK8 ECBF GETK11 ECC9 GETK12 ECD2 GETK13 ECE1 GETK14 ECEB GETK10 ECEC GETTAP EE29 GETA1 EE2B GETFMT F499 GOGO FA4A GOGO1 FA5B GOT[...]
-
Page 212
NHIS E688 NH1 E690 NAMO E8CF NAMO1 E8D6 NAMO2 E8E9 NAMO3 E8EB NAMO4 E8F5 NUMA EA46 NOUT EA51 NEWROW F160 NEWCOL F163 NOWS1 F909 OLDLEN 00E9 OPCODE A434 OUTFLG A413 OUTCKS E531 OUTCK E538 OUTCK1 E53B OUTCK2 E547 OUTLOW E901 OUTL1 E906 OUTPUT E97A OUT1 E97B OUT1A E986 OUT2 E98F OUTALL E9BC OUTA1 E9C8 OUTA2 E9D0 OUTA3 E9E2 OUTA4 E9EA ONEKEY ED05 ONEK1[...]
-
Page 213
READ2 E94D REA1 E956 RB2 E95C RDRUP E95F RDR1 E96A REDOUT E973 RED2 E976 RD2 EA5D RD1 EA70 RSPAC EA7B ROONEK ECEF ROO1 ED00 RDBIT EE3B RDBIT1 EE43 RDBIT2 EE51 RDBIT4 EE67 ROUT F286 ROUT1 F28B ROW1 F421 ROW2 F429 ROW3 F431 ROW4 F439 ROW5 F441 ROW6 F449 ROW7 F451 ROW8 F459 REGQ F461 RTMODE F491 RELADR F530 RTS1 F55A REENTR F6CF RESNOW F8D0 REP2 F93E [...]
-
Page 214
UT1LH A007 UT2L A008 UT2H A009 USR A00A UACR A00B UPCR A00C UIFR A00D UIER A00E UDRA A00F UIN 0108 UOUT 010A UP F6F9 UPNO F709 UP1 F713 UP4 F720 VECKSM E694 VECK1 E69E VECK2 E6AC VALID FCDD VECK5 FF66 VECK4 FF6F WRITAZ E2DB WRITAD E2DD WHEREI E848 WHE1 E85C WHE2 E868 WHE3 E870 WHEREO E871 WHRO1 E885 WHRO2 E88E WHRO3 E897 WHRO4 E89F WHICHT E8A8 WRAX[...]
-
Page 215
+------------------------------------------------------------------------ | TOPIC -- AIM Computer -- AIM BASIC Language Reference Manual +------------------------------------------------------------------------ AIM 65 MICROCOMPUTER BASIC LANGUAGE REFERENCE MANUAL Rockwell International Corporation Document No 29650 N49 March 1979 TABLE OF CONTENTS [...]
-
Page 216
problems. 100 INSTALLING BASIC IN THE AIM 65 ROM INSTALLATION PROCEDURE Before handling the BASIC ROM circuits, be sure to observe the precautions outlined in Section 1.4 of the AIM 65 User's Guide. To install the ROMs, turn off power to the AIM 65. Inspect the pins on the two BASIC ROMs to ensure that they are straight and free of foreign mat[...]
-
Page 217
memory to be initialized with AA (hex) in all bytes, starting with address 532. This, of course, destroys any previous BASIC programs, data in the AIM 65 Editor Text Buffer, or machine level routines that may have been stored in this portion of memory. Be sure to save any desired data or programs that may exist in this area before entering BASIC wi[...]
-
Page 218
PRINT commands will be directed to the display only. If the printer is turned on, all commands and data from PRINT commands will be directed to both the printer and display. With the printer off, data can still be directed to the printer by using the PRINT) command (see Subject 305). Similarly, INPUT statements will output data to the printer in re[...]
-
Page 219
* Although the ATN function is not included in AIM 65 BASIC, the ATN command is recognized (see Appendix H). 202 DIRECT AND INDIRECT COMMANDS DIRECT COMMANDS Try typing in the following: PRINT 10-4 (end with RETURN) BASIC will immediately print: 6 The print statement you typed in was executed as soon as you hit the RETURN key. This is called a dire[...]
-
Page 220
BASIC will reply with: 10 PRINT 2+3 20 PRINT 2-3 DELETING A LINE Sometimes it is desirable to delete a line of a program altogether. This is accomplished by typing the Line Number of the line so be deleted, followed by a carriage return. Type in the following: 10 LIST BASIC will reply with: 20 PRINT 2-3 We have now deleted line 10 from the program.[...]
-
Page 221
If we use a ";" instead of a comma, the next value will be printed immediately following the previous value. NOTE Numbers are always printed with at least one trailing space. Any text to be printed must always be enclosed in double quotes. Try the following examples: 1. PRINT "ONE HALF EQUALS"; 1/2 ONE HALF EQUALS .5 2. PRINT 1,[...]
-
Page 222
+1 1 -1 -1 6523 6523 -23.460 -23.46 1E20 1E+20 -12.3456E-7 -1.23456E-06 1.234567E-10 1.23457E-10 1000000000 1E+09 999999999 999999999 .1 .1 .01 .01 .000123 1.23 E-04 A number input from the keyboard or a numeric constant used in a BASIC program may have as many digits as desired, up to the maximum length of a line (72 characters) or maximum numeric[...]
-
Page 223
Z1 ZIABCD (variable name too long) TP TO (variable names cannot be reserved words) PSTG$ RGOTO (variable names cannot contain reserved words) COUNT ASSIGNING VARIABLES WITH A LET OR ASSIGNMENT STATEMENT Besides having values assigned to variables with an input statement, you can also set the value of a variable with a LET or assignment statement. T[...]
-
Page 224
REMARKS The REM (short for "remark") statement is used to insert comments or notes into a program. When BASIC encounters a REM statement, the rest of the line is ignored. This serves mainly as an aid for the programmer and serves no useful function as far as the operation of the program in solving a particular problem. 207 RELATIONAL TEST[...]
-
Page 225
At line 20, if A is smaller than B, A<=B is true so we goto line 50. At line 50, A<B will be true so we then go to line 80. "B IS BIGGER" is then printed and again we go back to the beginning. Try running the last two programs several times. It may be easier to understand if you try writing your own program at this time using the IF[...]
-
Page 226
The output of the program listed above will be exactly the same as the previous two programs. At line 10, N is set to equal 1. Line 20 causes the value of N and the square root of N so be printed. At line 30 we sees new type of statement. The "NEXT N" statement causes one to be added to N, and then if N<=9 we go back to the statement f[...]
-
Page 227
10 FOR I=1 TO 5 20 FOR J=1 TO 3 30 PRINT I,J 40 NEXT I 50 NEXT J It does not work because when the "NEXT I" is encountered, all knowledge of the J-loop is lost. This happens because the J-loop is "inside" the I-loop. 209 MATRIX OPERATIONS It is often convenient to be able to select any element in a table of numbers. BASIC allows[...]
-
Page 228
100 INPUT N 110 IF N=INT(N) THEN 140 120 PRINT "MUST BE INTEGER." 130 GOTO 100 140 RETURN This program asks for two numbers (which must be integers), and then prints their sum. The subroutine in this program is lines 100 to 140. The subroutine asks for a number, and if it is not an integer, asks for a new number. It will continue to ask u[...]
-
Page 229
If more values are read than there are numbers in the DATA statements, an out of data (OD) error occurs. That is why in line 40 we check to see if -999999 was read. This is not one of the numbers to be matched, but is used as a flag to indicate that all of the data (possible correct guesses) has been read. Therefore, if -999999 was read, we know th[...]
-
Page 230
ROCKW ROCKWE ROCKWEL ROCKWELL ROCKWELL R ROCKWELL R6 ROCKWELL R65 ROCKWELL R650 ROCKWELL R6500 Since A$ has 14 characters this loop will be executed with N=1,2,3,...,13,14. The first time through only the first character will be printed, the second time the first two characters will be printed, etc. RIGHT$ FUNCTION Another string function, called &[...]
-
Page 231
B$="BASIC FOR"+" "+A$ PRINT B$ BASIC FOR ROCKWELL R6500 Concatenation is especially useful if you wish to take a string apart and then put it back together with slight modifications. For instance: C$=LEFT$(B$,9)+"-"+MID$(B$,11,8)+"-"+RIGHT$(B$,5) PRINT C$ BASIC FOR-ROCKWELL-R6500 VAL AND STRS FUNCTIONS Someti[...]
-
Page 232
ADDITIONAL STRING CONSIDERATIONS 1. A string may contain from 0 to 255 characters. All string variable names end in a dollar sign ($); for example, A$, B9$, K$, HELLO$. 2. String matrices may be dimensioned exactly like numeric matrices. For instance, DIM A$(10,10) creates a string matrix of 121 elements, eleven rows by elevon columns (rows 0 to 10[...]
-
Page 233
command level and OK is typed. Prints "BREAK IN LINE XXXX," where XXXX is the line number of the next statement to be executed. There is no F1 key on a TTY. However, when TTY is being used, the AIM 65's F1 key is operational and can be used. : (colon) A colon is used to separate statements on a line. Colons may be used in direct and [...]
-
Page 234
(5 plus 3/4). The precedence of operators used in evaluating expressions is as follows, in order beginning with the highest precedence : NOTE Operators listed on the same line have the same precedence. 1) Expressions in parentheses are always evaluated first 2) ^ (F3 KEY) ExponentiatiOn 3) NEGATION -X where X may be a formula 4) * and / Multiplicat[...]
-
Page 235
NOT IF NOT Q3 THEN 4 If expression "NOT Q3" is true (Because Q3 is false), then branch to line 4 Note: NOT -1=0 (NOT true=false) AND, OR, and NOT can be used for bit manipulation, and for performing boolean operations. These three operators convert their arguments to sixteen bit, signed two's-complement integers in the range -32768 t[...]
-
Page 236
For instance, suppose bit 1 of location 40963 is 0 when the door to Room X is closed, and 1 if the door is open. The following program will print "Intruder Alert" if the door is opened: 10 IF NOT (PEEK(40963) AND 2) THEN 10 This line will execute over and over until bit 1 (masked or selected by the 2) becomes a 1. When that happens, we go[...]
-
Page 237
values you may become satisfied that your program is functioning correctly. You should then type in CONT to Continue executing your program where it left off, or type a direct GOTO statement to resume execution of the program at a different line. You could also use assignment statements to set some of your variables to different values. Remember, i[...]
-
Page 238
POKE POKE location, byte 357 POKE I,J The POKE statement stores the byte specified by its second argument (J) into the location given by its first argument (I). The byte to be stored must be =>0 and <=255, or an FC error will occur. The address (I) must be =>0 and <=65535, or an FC error result. Caution: Careless use of the POKE stateme[...]
-
Page 239
FNJ7, FNKO, FNR2. User defined func- tions are restricted to one line. A function may be defined to be any expression, but may only have one argument. In the example, B and C are variables that are used in the program. Executing the DEF state- ment defines the function. User defined functions can be redefined by executing another DEF statement for [...]
-
Page 240
is => the final value, then the first state- ment following the FOR statement is executed. Otherwise, the statement following the NEXT statement is executed. All FOR loops execute the statements between the FOR and the NEXT at least once, even in cases like FOR V=1 TO 0. Note that expressions (formulas) may be 315 FOR V=10*N TO used for the init[...]
-
Page 241
In this example, if X is less than 0, the 26 IF X<0 THEN PRINT PRINT statement will be executed and "ERROR, X NEGATIVE": then the GOTO statement will branch to GOTO 350 line 350. If the X was 0 or positive, BASIC will proceed to execute the lines after line 26. STATEMENT SYNTAX/FUNCTION EXAMPLE LET [LET] variable = expression 300 LET W[...]
-
Page 242
In this case V=0 will be executed, 505 V=0: REM SET V=0 STATEMENT SYNTAX/FUNCTION EXAMPLE RESTORE RESTORE 510 RESTORE Allows the re-reading of DATA statements, After a RESTORE, the next piece of data read will be the first piece listed in the first DATA statement of the program. The second piece of data read will be the second piece listed in the f[...]
-
Page 243
commas (,), you must enclose the string in double quotes. It is illegal so have a double quote within string data or a string literal. (""BASIC"" is illegal.) STATEMENT SYNTAX/FUNCTION EXAMPLE INPUT INPUT [!] ["prompt string literal";] 3 INPUT V,W,W2 variable [, variable] ... Requests data from the keyboard (to be type[...]
-
Page 244
then a carriage return/line feed is executed. "VALUE IS" will be displayed and printed. 410 PRINT ! "VALUE IS";A String expressions may be printed. 420 PRINT MID$(A$,2); STATEMENT SYNTAX/FUNCTION EXAMPLE READ READ variable [, variable] 490 READ V,W Read data into specified variables from a DATA statement. The first piece of data[...]
-
Page 245
Inputs a single character from the keyboard. If data is at the keyboard, it is put in the variable specified in the GET statement. If no data is available, the BASIC program will continue execution. GET can only be used as an indirect command. STATEMENT SYNTAX/FUNCTION EXAMPLE LEFT$ LEFT$ (string expression, length) 310 PRINT LEFT$(X$,I) Gives the [...]
-
Page 246
307 ARITHMETIC FUNCTIONS STATEMENT SYNTAX/FUNCTION EXAMPLE ABS ABS (expression) 120 PRINT ABS(X) Gives the absolute value of the expression X. ABS returns X if X>=0, -X otherwise. STATEMENT SYNTAX/FUNCTION EXAMPLE ATN ATN (expression) 210 PRINT ATN(X) Gives the arcTangent of the expression X. The result is returned in radians and ranges from -PI[...]
-
Page 247
Note that (B-A)*RND(1)+A will generate a random number between A and B. STATEMENT SYNTAX/FUNCTION EXAMPLE SGN SGN (expression) 230 PRINT SGN(X) Gives 1. If X>0, 0 if X=0, and -1 if X<0. STATEMENT SYNTAX/FUNCTION EXAMPLE SIN SIN (expression) 190 PRINT SIN(X) Gives the sine of the expression X. X is interpreted as being in radians. Note: COS(X)[...]
-
Page 248
FUNCTION FUNCTION EXPRESSED IN TERMS OF BASIC FUNCTIONS INVERSE HYPERBOLIC SINE ARGSINH(X) = LOG(X+SQR(X*X+1)) INVERSE HYPERBOLIC COSINE ARGCOSH(X) = LOG(X+SQR(X*X-1)) INVERSE HYPERBOLIC TANGENT ARGTANH(X) = LOG((1+X)/(1-X))/2 INVERSE HYPERBOLIC SECANT ARGSECH(X) = LOG((XQR(-X*X+1)+1)/X INVERSE HYPERBOLIC COSECANT ARGCSCH(X) = LOG((SGN(X)*SQR(X*X+1[...]
-
Page 249
subroutine has been patched in 7. Calls to MID$, LEFT$, RIGHT$, WAIT, PEEK, POKE, TAB, SPC or ON...GOTO with an improper argument. ID Illegal Direct. You cannot use an INPUT, DEF or GET statement as a direct command. LS Long String. Attempt was made by use of the concantenation operator to create a string more than 255 characters long. NF NEXT with[...]
-
Page 250
3. Delete all REM statements. Each REM statement uses at least one byte plus the number in the comment text. For instance, the statement 130 REM THIS IS A COMMENT uses 24 bytes of memory. In the statement 140 X=X+Y: REM UPDATE SUM, the REM uses 14 bytes of memory including the colon before the REM. 4. Use variables instead of constants. Suppose you[...]
-
Page 251
2. THIS IS PROBABLY THE MOST IMPORTANT SPEED HINT. Use variables instead of constants. It takes more time to convert a constant to its floating point representation than it does to fetch the value of a simple or matrix variable. This is especially important within FOR...NEXT loops or other code that is executed repeatedly. 3. Variables which are en[...]
-
Page 252
5. Programs which use the MAT functions available in some BASICs will have to be re-written using FOR...NEXT loops to perform the appropriate operations. 6. A PRINT statement with no arguments will not cause a paper feed on the printer. To generate a paper feed (blank line), use PRINT "space" E ASCII CHARACTER CODES DECIMAL CHAR. DECIMAL [...]
-
Page 253
Parameter (W), passed to a subroutine by USR(W), will be converted to floating-point accumulator located at $A9. The floating-point accumulator has the following format: ADDRESS CONTENT $A9 Exponent + $81 ($80 if mantissa = 00) $AA-$AD Mantissa, normalized so that Bit 7 of MSB is set. $AA is MSB, $AD is LSB. $AE Sign of mantissa A parameter passed [...]
-
Page 254
* The program then swaps the bytes of the integer. * Finally, the program converts the result to floating point and returns to BASIC (JMP C0D3). Address $C0D3 was found in locations $B008, $B009. (Address $C0D3 may vary with different versions of BASIC. Be sure to check locations $B008 and $B009 for the correct address. <1> 0A26 *=A00 0A00 A0[...]
-
Page 255
position. Be sure to initialise the counter at the start of the tape. Note: Since remote control must be used to retrieve a BASIC program, observe the tape gap CAUTION in Section 9.1.5 (Step 1) of the AIM 65 User's Guide. 2. While in BASIC, type in SAVE. BASIC will respond with: OUT= 3. Enter a T (for "Tape"). BASIC will display: OUT[...]
-
Page 256
observed: When BASIC stores a program on cassette, it inserts a CTRL/Z after the last line. The AIM 65 Editor will strip off the CTRL/Z when it retrieves the program. Therefore, before storing a BASIC program from the Editor, the user must insert a CTRL/Z following the last line of the program. H ATN IMPLEMENTATION The ATN function (see Subject 307[...]
-
Page 257
address of the ATN function instructions. This can be done using BASIC initialization, as follows: <5> MEMORY SIZE? 3968 Limit BASIC to F80 WIDTH? 16 3438 BYTES FREE AIM 65 BASIC V1.1 POKE 188,189 Change ATN function vector low to $BD POKE 189,15 Change ATN function vector high to $0F ?ATN (TAN(.5)) Test case to verify proper ATN function pro[...]