Advertisement
Xandaros

User input test

May 1st, 2012
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. !to "disk_32e5370fc2358b90.img"
  2. *=0x500
  3.  
  4.     SEC
  5.     XCE
  6.     REP #$30        ; 16-bit mode
  7.     !al
  8.  
  9.     LDA #$1
  10.     MMU #$0         ; map device 1 to redbus window
  11.     LDA #$300
  12.     MMU #$1         ; redbus window situated at 0x300
  13.     MMU #$2         ; enable redbus
  14.  
  15.     LDA #$400
  16.     MMU #$3         ; external memory situated at 0x400
  17.     MMU #$4         ; enable external memory
  18.  
  19.     LDA #$500
  20.     MMU #$6         ; POR = 0x500, whatever that might be
  21.  
  22.     LDA #$0
  23.     STA $303        ; hide cursor
  24.  
  25.     SEP #$30        ; 8-bit mode
  26.     !as
  27.  
  28.     LDX #$0         ; position to write to
  29.  
  30. --  LDY $305        ; keys in buffer
  31.     CPY #$0
  32.     BEQ --
  33.  
  34. -   CPY $304
  35.     BEQ +
  36.     LDA $306        ; the key
  37.     STA $310,X
  38.     INC $304
  39.     INX
  40.     JMP -
  41.  
  42. +   LDA #$0
  43.     STA $305
  44.     STA $304
  45.     JMP --
  46.     WAI
  47.  
  48. !align 128, 128, 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement