Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
mg_notes:iie_card:weird_stuff [2017/08/06 03:22]
M.G. [Other Weird Instructions]
mg_notes:iie_card:weird_stuff [2017/08/07 15:14]
M.G. [Other Weird Instructions]
Line 39: Line 39:
  
 ^ In Routine ^ Address ^ Code    ^ Function ^ ^ In Routine ^ Address ^ Code    ^ Function ^
-RESET   | $FAB4   | $02 $02 | ? | +PWRUP   | $FAB4   | $02 $02 | ? (appears where standard %%//%%e has LDA #$C8 at beginning of boot slot search) ​
-RESET   | $FAC0   | $02 $03 | ? |+PWRUP   | $FAC0   | $02 $03 | ? (appears where standard %%//%%e has CMP #$C0 after decrmenting the slot pointer) ​|
 | APPLEII | $FB63   | $02 $04 | Display copyright message on screen, disappears if screen scrolls. | | APPLEII | $FB63   | $02 $04 | Display copyright message on screen, disappears if screen scrolls. |
 | BELL1   | $FBDD   | $02 $01 | Play system bell sound. | | BELL1   | $FBDD   | $02 $01 | Play system bell sound. |
-| GETLN1 ​ | $FD78   | $02 $06 | Key translation called right after rdchar. ​ ​Converts ​A reg from <​key>​DELETE</​key>​ to <​key><​-</​key>​. |+| GETLN1 ​ | $FD78   | $02 $06 | Key translation called right after rdchar. ​If A reg has <​key>​DELETE</​key>​, converts it to <​key><​-</​key>​. | 
 +|         ​| ​        | $02 $05 | Not found in firmware, yet, but presumably this exists. | 
 + 
 +Hypothesis for $02 $02 and $02 $03: 
 + 
 +$02 $02 loads the accumulator with $Cn+1 where n is the slot selected in the control panel, or $C8 for "​Scan"​. 
 + 
 +$02 $03 checks the accumulator and depending on the control panel setting either allows the loop to continue (scan and A > $C0), drops to BASIC (scan and A = $C0), or prints the "​unable to boot" message (specific slot and A != $Cn).
  
 ==== The Key Translation and the A register ==== ==== The Key Translation and the A register ====
Line 59: Line 66:
 </​code>​ </​code>​
  
-FD35 is the RDCHAR routine, FDDA is the print byte routine. ​ This routine reads a keypress and outputs its hex code.  Run it a few times to convince yourself there is no funny business. ​ Run it a final time and press the delete ​key.+FD35 is the RDCHAR routine, FDDA is the print byte routine. ​ This routine reads a keypress and outputs its hex code.  Run it a few times to convince yourself there is no funny business. ​ Run it a final time and press <key>​DELETE</​key>​.
  
 <​code>​ <​code>​
Line 67: Line 74:
 </​code>​ </​code>​
  
-Now want to see something interesting? ​ Change the NOPs to $02 $06 and run it again.  ​Press delete.+FF is exactly what we expect to see with the Apple II delete key. 
 + 
 +Now want to see something interesting? ​ Change the NOPs to $02 $06 and run it again.  ​Try a few keys, then try it with <​key>​DELETE</​key>​.
  
 <​code>​ <​code>​
Line 76: Line 85:
 </​code>​ </​code>​
  
-That's some serious magic.+88 is the code for the left arrow key.  ​That's some serious magic, and in two bytes the Card converts <​key>​DELETE</​key>​ to <​key><​-</​key>​. 
 + 
 +==== The Two-Byte Copyright ==== 
 + 
 +Try this sequence of instructions:​ 
 + 
 +<​code>​ 
 +]HOME 
 +]CALL -151 
 +*300:02 04 60 
 +*300G 
 +</​code>​
  
 +Hit the left arrow a bunch of times until the display scrolls. **POOF!**
 +