Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| histcomp:apple_ii [2024-08-31 17:06] – asdf | histcomp:apple_ii [2024-10-01 06:15] (current) – asdf | ||
|---|---|---|---|
| Line 208: | Line 208: | ||
| ==== ProDOS 8 ==== | ==== ProDOS 8 ==== | ||
| ==== CP/M ==== | ==== CP/M ==== | ||
| + | In order to run CP/M, a Z80 soft card is required. While we do not currently possess one, it should be possible to find one online --- or we may be able to assemble our own from scratch using available schematics [(msc80scschem)]. | ||
| ===== Peripheral cards ===== | ===== Peripheral cards ===== | ||
| Line 218: | Line 219: | ||
| ==== Super Serial ==== | ==== Super Serial ==== | ||
| ==== Applied Engineering RAMFactor | ==== Applied Engineering RAMFactor | ||
| + | A RAM disk/memory expansion. ProDOS automatically registers it as a volume named ''/ | ||
| + | The particular revision we have contains a total of 1 MB of RAM. | ||
| + | |||
| + | ===== Sample code ===== | ||
| + | ==== Determining current execution page ==== | ||
| + | This snippet is particularly useful for writing peripheral card ROM, where the code needs to function irrespective of its installed slot. It works by calling a " | ||
| + | |||
| + | If calling from a peripheral card, the slot number can be identified by ANDing the result with 0F. | ||
| + | <code asm6502> | ||
| + | ; stores the high byte of the execution address in the A register | ||
| + | ; clobbers: A, X | ||
| + | getpage: | ||
| + | JSR $FF58 ; push the return address to the stack | ||
| + | TSX ; use stack pointer as index to stack page | ||
| + | LDA $100, | ||
| + | RTS | ||
| + | </ | ||
| + | |||
| + | ==== Writing bytes as hexadecimal ==== | ||
| + | We don't have to reinvent the wheel for this one --- the [[#system monitor]] includes a handy routine called '' | ||
| + | |||
| + | <code asm6502> | ||
| + | PRBYTE: | ||
| + | LSR A | ||
| + | LSR A | ||
| + | LSR A | ||
| + | LSR A | ||
| + | JSR PRHEXZ | ||
| + | PLA | ||
| + | PRHEX: | ||
| + | PRHEXZ: | ||
| + | CMP #$BA | ||
| + | BCC COUT ; =$FDED | ||
| + | ADC #$06 | ||
| + | COUT: JMP (CSWL) | ||
| + | </ | ||
| + | |||
| + | To make use of it from Applesoft, load the following anywhere into memory: | ||
| + | |||
| + | <code asm6502> | ||
| + | JSR $DEBE ; CHKCOM - skips comma in Applesoft parsing | ||
| + | JSR $DFE3 ; GETPNT - get pointer to variable data, put it in $83...$84 | ||
| + | LDY #$00 | ||
| + | LDA ($83), | ||
| + | JSR $FDDA ; PRBYTE | ||
| + | INY | ||
| + | LDA ($83), | ||
| + | JMP $FDDA ; PRBYTE (will RTS for us) | ||
| + | </ | ||
| + | |||
| + | Then it can be called from Applesoft like so (assuming the program was loaded at \$0300): | ||
| + | |||
| + | <code basic> | ||
| + | 10 LET X% = 69 | ||
| + | 20 CALL 768,X% | ||
| + | </ | ||
| + | |||
| + | ==== Generate the Mandelbrot set ==== | ||
| + | Useful as a benchmark. The computer must be in 80-column mode for it to display properly. | ||
| + | |||
| + | <code basic> | ||
| + | 10 FOR Y=-12 TO 12 | ||
| + | 20 FOR X=-39 TO 39 | ||
| + | 30 CA=X*0.0458 | ||
| + | 40 CB=Y*.08333 | ||
| + | 50 A=CA | ||
| + | 60 B=CB | ||
| + | 70 FOR I = 0 TO 15 | ||
| + | 80 T=A*A-B*B+CA | ||
| + | 90 B=2*A*B+CB | ||
| + | 100 A=T | ||
| + | 110 IF(A*A+B*B)> | ||
| + | 120 NEXT I | ||
| + | 130 PRINT " "; | ||
| + | 140 GOTO 210 | ||
| + | 200 IF I>9 THEN I=I+7 | ||
| + | 205 PRINT CHR$(48+I); | ||
| + | 210 NEXT X | ||
| + | 220 PRINT | ||
| + | 230 NEXT Y | ||
| + | </ | ||
| ===== Resources ===== | ===== Resources ===== | ||
| Line 225: | Line 307: | ||
| * [[https:// | * [[https:// | ||
| - | ===== References | + | ===== Notes ===== |
| [(Little1985>// | [(Little1985>// | ||
| [(a2etechnotes> | [(a2etechnotes> | ||
| [(a2etechrefmanual> | [(a2etechrefmanual> | ||
| + | [(msc80scschem> | ||
| + | [(a2eenhpg> | ||
| + | [(Sather1985> | ||
| + | [(usingprodos> | ||
| + | [(allpinoutsa2> | ||
| ~~REFNOTES~~ | ~~REFNOTES~~ | ||