diff --git a/src/main/resources/codemirror/pokes-peeks-calls.html b/src/main/resources/codemirror/pokes-peeks-calls.html new file mode 100644 index 0000000..20f1aa7 --- /dev/null +++ b/src/main/resources/codemirror/pokes-peeks-calls.html @@ -0,0 +1,296 @@ +$F800 PLOT +$F819 HLIN +$F828 VLIN +$F864 COLOR= +$F871 SCRN( +$F94A HTAB (input in X register) +$FAA6 REBOOT +$FB1E PDL( +$FB39 TEXT +$FB40 GR +$FB5B VTAB (input in X register) +$FB60 BANNER (doesn't work on clones, sometimes crashes a IIgs) +$FC58 CLRSCR +$FC9C CLREOL +$FDOC GETCH + (basically deadwaits on the highorder bit of $C000, then hits $C010) +$FDED PUTCH (input in A register) + (for NORMAL text set the high-order bit) +$FD6A GETLIN (output to address $200 and up. with CR termination) + (length of string minus the CR is stored in the X register) + +AppleSoft Graphic, Input, Output and String Instructions + +----------------------------------------------------------------- +GR + + ; Method 1 + JSR $FB40 ; Sets Lo-Res graphics mode with 4 lines of text + ; and clears the graphic area to black + + + ;Method 2 + STA $C050 ; Sets Lo-Res graphics mode with 4 lines of text + STA $C053 ; but doesn't clear the graphics area + STA $C054 + STA $C056 + +----------------------------------------------------------------- + +COLOR + + LDA #N ; Sets the plotting color to N, 0 <= N <= 15 + JSR $F864 + +----------------------------------------------------------------- + +PLOT + + LDY #X ; Lo-Res Plot X (Horizontal) Coordinate (0-39) + LDA #Y ; Lo-Res Plot Y (Vertical) Coordinate (0-39) + JSR $F800 + +----------------------------------------------------------------- + +HLIN + + LDA #Y ; Y Coordinate (0-39) + LDY #Xr ; Rightmost X Coordinate (0-39) + STY $2C ; Store it at H2 + LDY #Xl ; Leftmost X Coordinate (0-39) + JSR $F819 + +----------------------------------------------------------------- + +VLIN + + LDY #X ; X Coordinate (0-39) + LDA #Yb ; Bottom Y Coordinate (0-39) + STA $2C ; Store it at V2 + LDA #Yt ; Top Y Coordinate (0-39) + JSR $F828 + +----------------------------------------------------------------- + +SCRN + + LDY #X ; X Coordinate (0-39) + LDA #Y ; Y Coordinate (0-39) + JSR $F871 ; Result (0-15) in Accumulator + +----------------------------------------------------------------- + +HGR + + ; Method 1 + JSR $F3E2 ; Sets Hi-Res Mode with 4 lines of text, + ; and clears the graphics screen + + ; Method 2 + STA $C050 ; Sets Hi-Res Mode with 4 lines of text, + STA $C053 ; and doesn't clear the graphics screen + STA $C054 + STA $C057 + LDA #$20 + STA $E6 + +----------------------------------------------------------------- + +HGR2 + + ; Method 1 + JSR $F3D8 ; Full Screen Hi-Res Page 2, Clears Screen + + ; Method 2 + STA $C050 ; Full Screen Hi-Res Page 2, Doesn't Clear Screen + STA $C052 + STA $C055 + STA $C057 + LDA #$40 + STA $E6 + +----------------------------------------------------------------- + +HCOLOR + + LDA #N ; Select Color N (0-7) + JSR $F6EC + +----------------------------------------------------------------- + +HPLOT + + LDX #Xl ; Low Byte of X Coordinate (0-255) + LDY #Xh ; High Byte of X Coordinate (0 or 1) + LDA #Y ; Y Coordinate (0-191) + JSR $F457 + +----------------------------------------------------------------- + +HPLOT TO + + LDA #Xl ; Low Byte of X Coordinate (0-255) + LDX #Xh ; High Byte of X Coordinate (0 or 1) + LDY #Y ; Y Coordinate (0-191) + JSR $F53A + +----------------------------------------------------------------- + +PDL(X) + + LDX #N ; Select Paddle (0-3 on //e and II+; 0-1 on //c) + JSR $FB1E ; Result in Y register + +----------------------------------------------------------------- + +ROT + + LDA #N ; Sets rotation (0-255), immediately before DRAW + ; or XDRAW call [See DRAW and XDRAW] + +----------------------------------------------------------------- + +SCALE + + LDA #N ; Sets SCALE, N = scale value + STA $E7 + +----------------------------------------------------------------- + +DRAW + + LDY #Xh ; High byte of X Coordinate + LDX #Xl ; Low byte of X Coordinate + LDA #Y ; Y Coordinate + JSR $F411 ; Move Hi-Res Cursor + LDY #SAH ; High Byte of Actual Shape Address (not table) + LDX #SAL ; Low Byte of actual shape address + LDA #R ; Set Rotation + JSR $F601 ; Execute the DRAW Function + +----------------------------------------------------------------- + +XDRAW + + LDY #Xh ; High byte of X Coordinate + LDX #Xl ; Low byte of X Coordinate + LDA #Y ; Y Coordinate + JSR $F411 ; Move Hi-Res Cursor + LDY #SAH ; High Byte of Actual Shape Address (not table) + LDX #SAL ; Low Byte of actual shape address + LDA #R ; Set Rotation + JSR $F65D ; Execute the XDRAW Function + +----------------------------------------------------------------- + +TEXT + + ; Method 1 + JSR $FB2F ; Sets text mode, normal full-screen format + + ; Method 2 + STA $C051 ; Text mode, window set to existing parameters + +----------------------------------------------------------------- + +HOME + + JSR $FC58 ; Clears Text Screen, Cursor to upper left + +----------------------------------------------------------------- + +NORMAL + + JSR $FE84 ; Set Normal-Text Mode + +----------------------------------------------------------------- + +INVERSE + + JSR $FE80 ; Set Inverse-Text Mode + +----------------------------------------------------------------- + +FLASH + + LDA #$7F ; Set Flashing-Text Mode + JSR $FE86 + +----------------------------------------------------------------- + +PRINT + + JSR $FD8E ; Prints a carriage-return + +----------------------------------------------------------------- + +PRINT "AB" + + LDA #$C1 ; Code for letter "A" + JSR $FDED ; (COUT) Print "A" + LDA #$C2 ; Code for letter "B" + JSR $FDED ; (COUT) Print "B" + JSR $FD8E ; Print Carriage-Return + +----------------------------------------------------------------- + +GET A$ + + JSR $FD0C ; Hex code of character is in Accumulator + +----------------------------------------------------------------- + +VTAB + + LDA #n ; Count + STA $25 + JSR $FC22 + +----------------------------------------------------------------- +RND + + JSR $EFAE + LDA $9F ; Get Random Number + +----------------------------------------------------------------- + +INPUT A$ + + JSR $FD6A ; On return, X register contains length of string + ; and string data is at $200 + + STX addr ; Save Length of string at user address + TXA ; Move Length of Accumulator + BEQ L1 ; Jump to L1 if Length is 0 + TAY ; Set Y register to Length + DEX ; Set X register to length - 1 +L2: + LDA $200,X ; Get Character from $200 Buffer + STA addr,Y ; Save at user address buffer + DEX + DEY + BNE L2 +L1: + RTS + +----------------------------------------------------------------- + +PRINT A$; + + LDA addr ; Get string length (first byte) + BEQ L2 ; Exit if Length is 0 + LDX #1 ; Point to start of string +L1: + LDA addr,X ; Get Character + JSR $FDED ; Print Character + INX ; Move To Next Character + CPX addr ; Compare X Register to Length of String + BCC L1 + BEQ L1 +L2: + RTS + +----------------------------------------------------------------- + + + diff --git a/src/main/resources/codemirror/zero-page.html b/src/main/resources/codemirror/zero-page.html new file mode 100644 index 0000000..b81de35 --- /dev/null +++ b/src/main/resources/codemirror/zero-page.html @@ -0,0 +1,147 @@ +This comes from the comp.sys.apple2 FAQ maintained by Jeff Hurlburt (rubywand@swbell.net) +

+

     When it comes to writing compact fast-executing +code, knowing which Zero Page locations are available is essential information +for assembly language programmers. +

     The chart here uses information from Apple's +Apple II technical references, Beneath Apple DOS (by Worth and Lechner), +and Exploring Apple GS/OS and ProDOS 8 (by Little). It shows which Zero +Page locations are used by the Monitor, Applesoft BASIC, Integer BASIC, +DOS 3.3, ProDOS, and ProDOS BASIC.SYSTEM. +
  +

          Apple +II Zero Page Usage +

                        +Lo Nibble of Address +
Hi +
Nib  0   1   2   3   +4   5   6   7   8   9   +A   B   C   D   E   F +
     --- --- --- --- --- --- --- --- --- --- +--- --- --- --- --- --- +
 0 | A~  A~  A   A   +A   A   -   -   -   -   +A   A   A   AI  A   A +
 1 | A   A   +A   A   A   A   A   A   +A   A   A   A   A   A   +-   M* +
 2 | M   M   M   M   +M3  M   MA3 MA3 M3  M3  M3  M3  MA3 +MA3 M3  MA3 +
 3 | MA  M   MA  +MA3 M   M3  M3B M3B M3B M3B M~  M~  MA3~MA3~MA3~MA3~ +
 4 | M3~ M3~ M3~ M3~ M3~ M3~ M3~ M3~ M3~ M3~ I3~ I3~ +I3~ I3~ M~  M +
 5 | MA  MA  MA  +MA  MA  MAI AI  AI  AI  AI  AI  AI  +AI  AI  AI  AI +
 6 | AI  AI  AI  AI  AI  AI  +AI  AI3 AI3 AI3 AI3 AI  AI  AI  AI  AI3 +
 7 | AI3 AI  AI  AI3 +AI3 AI  AI3 AI  AI  AI  AI  AI  AI  +AI  AI  AI +
 8 | AI  AI  AI  AI  AI  AI  +AI  AI  AI  AI  AI  AI  AI  AI  +AI  AI +
 9 | AI  AI  AI  +AI  AI  AI  AI  AI  AI  AI  AI  +AI  AI  AI  AI  AI +
 A | AI  AI  AI  AI  AI  AI  +AI  AI  AI  AI  AI  AI  AI  AI  +AI  AI3 +
 B | AI3 AI  AI  AI  +AI  AI  AI  AI  AI  AI  AI  AI  +AI  AI  AI  AI +
 C | AI  AI  AI  AI  AI  AI  +AI  AI  AI  AI  AI3 AI3 AI3 AI3 I   I +
 D | AI  AI  AI  +AI  AI  AI  AI3 I   AI3 AI3 AI  AI  +AI  AI  AI3 AI +
 E | A   A   A   A   +A   A   A   A   A   A   +A   -   -   -   -   - +
 F | A   A   +A   A   A   A   A   A   +A   A   -   -   -   -  +I   AI +
  +

M = Used by Monitor; * used in early Apple IIe ROMs-- now free +
A = Used by Applesoft BASIC +
I = Used by Integer BASIC +
3 = Used by DOS 3.3 +
~ = Used by ProDOS ($40-$4E is saved before and restored after +use) +
B = Used by ProDOS BASIC.SYSTEM (also uses all Applesoft locations) +
- = Free; not used +

--Bryan Dunphy, Michael J. Mahon, Rubywand

+
+ List compiled by Jon Relay +
+$06-$09 - Free Space (Address of Main Menu Routine for Jon Relay's Desktop)
+$0A-$0C - JMP to USR() User Function Routine
+$18     - First Data Track
+$19     - First Data Sector
+$1A-$1B - Shape Pointer for DRAW (???)
+$1C     - Last COLOR Used
+$1D-$1E - Free Space
+$20     - Left Margin (0 - 39/79, 0 is default)
+$21     - Width (1 - 40/80, 40 is default, 0 crashes Applesoft)
+$22     - Top Margin (0 - 23, 0 is default, 20 in graphics mode)
+$23     - Bottom Margin (0 - 23, 23 is default)
+$24     - Horizontal Cursor Position (0 - 39/79)
+$25     - Vertical Cursor Position (0 - 23)
+$26-$27 - Address of Byte Containing X,Y (???)
+$28-$29 - Base Address of Text Cursor's Position
+$2B     - Boot Slot * 16
+$2C     - Lo-Res HLIN/VLIN Endpoint
+$30     - COLOR Value * 17
+$32     - Text Mask ($FF = Normal, $7F = Inverse, $3F = Flashing)
+$33     - Prompt Character
+$36-$37 - Address of Output Routine
+$38-$39 - Address of Input Routine
+$3C-$4E - Prodos/Dos 3.3 routines
+$50-$51 - Result of the Conversion of the FAC to a 16-Bit Integer
+$67-$68 - Address of Beginning of BASIC Program ($0801 is default)
+$69-$6A - Address of Beginning of BASIC Variables (LOMEM / vartab)
+$6B-$6C - Address of Beginning of BASIC Arrays
+$6D-$6E - Address of End of BASIC Variables
+$6F-$70 - Address of End of String Data
+$71-$72 - Address to Move String To (???)
+$73-$74 - Address of Beginning of String Data
+$75-$76 - Current Line Number Being Executed
+$77-$78 - Line Number Where END or STOP or BREAK Occurred
+$79-$7A - Address of Line Number Being Executed
+$7B-$7C - Current Address of DATA
+$7D-$7E - Next Address of DATA
+$7F-$80 - Address of Input or Data (???)
+$81-$82 - Last Used Variable's Name
+$83-$84 - Last Used Variable's Address
+$9B-$9C - Pointer for $D61A and $F7D9 (???)
+$9D-$A3 - Floating Point Accumulator (FAC)
+$A5-$AB - Floating Point Argument Register (ARG)
+$AF-$B0 - Address of End of BASIC Program
+$B1-$B6 - Subroutine to Increase the String Data Pointer
+$B7-$BE - Subroutine to Return the Character Pointed to by the String Data Pointer
+$CE-$CF - Free Space
+$D4     - Error Code Flag (???)
+$D7     - Free Space
+$D8     - Error Flag (>=128 if error handler active)
+$DA-$DB - Line Number Where Error Occurred
+$DE     - Error Code
+$E0-$E1 - Horizontal Coordinate of HPLOT
+$E2     - Vertical Coordinate of HPLOT
+$E3     - Free Space
+$E4     - HCOLOR Value (0=0, 1=42, 2=85, 3=127, 4=128, 5=170, 6=213, 7=255)
+$E6     - High Byte of Address of First Byte of Where HGR is Plotted
+$E7     - SCALE Value (0 = 256)
+$E8-$E9 - Address of Shape Table
+$EA     - DRAW/XDRAW Collision Count
+$EB-$EF - Free Space
+$F1     - SPEED Value (Subtracted From 256)
+$F3     - Text OR mask (for flashing text)
+$F4-$F5 - address of error handler (points to line number after ONERR GOTO...)
+$F9     - ROT Value
+$FA-$FE - Free Space
+$FF     - Free Space (Flag Bits for Jon Relay's Desktop), also used by Applesoft STR$ routine
+
\ No newline at end of file