mirror of
https://github.com/mnaberez/py65.git
synced 2024-12-28 00:29:19 +00:00
Remove blocking_getc at $f005
This commit is contained in:
parent
589aed7ea7
commit
0a6f7b90a2
@ -1,5 +1,10 @@
|
|||||||
0.19-dev (Next Release)
|
0.19-dev (Next Release)
|
||||||
|
|
||||||
|
- Blocking character input at $F005 has been removed. The I/O area
|
||||||
|
was designed to be compatible with Michal Kowalski's simulator,
|
||||||
|
and it uses this address for another purpose. Examples that depended
|
||||||
|
on $F005 have been changed to use $F004.
|
||||||
|
|
||||||
0.18 (2014-01-30)
|
0.18 (2014-01-30)
|
||||||
|
|
||||||
- Fixed a bug in RTS where popping $FFFF off the stack would cause
|
- Fixed a bug in RTS where popping $FFFF off the stack would cause
|
||||||
|
@ -15,7 +15,7 @@ START = $FFFFFe00
|
|||||||
|
|
||||||
; I/O is memory-mapped in py65:
|
; I/O is memory-mapped in py65:
|
||||||
PUTC = $f001
|
PUTC = $f001
|
||||||
GETC = $f005 ; blocking input
|
GETC = $f004
|
||||||
|
|
||||||
; Note that Hex format for 65Org16 uses ';' not ':' as the start of record mark
|
; Note that Hex format for 65Org16 uses ';' not ':' as the start of record mark
|
||||||
; also note that some fields are now composed of 16-bit elements:
|
; also note that some fields are now composed of 16-bit elements:
|
||||||
@ -139,6 +139,7 @@ HDEROK jsr PUTSTRI
|
|||||||
|
|
||||||
; For py65, the input routine will block until a character arrives
|
; For py65, the input routine will block until a character arrives
|
||||||
GETSER lda GETC
|
GETSER lda GETC
|
||||||
|
beq GETSER
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; get four ascii chars, adding both octets into the checksum
|
; get four ascii chars, adding both octets into the checksum
|
||||||
|
@ -16,13 +16,14 @@
|
|||||||
|
|
||||||
; I/O is memory-mapped in py65:
|
; I/O is memory-mapped in py65:
|
||||||
PUTC = $f001
|
PUTC = $f001
|
||||||
GETC = $f005 ; blocking input
|
GETC = $f004
|
||||||
|
|
||||||
; the py65 hexload boot ROM will only load to $0200
|
; the py65 hexload boot ROM will only load to $0200
|
||||||
.ORG $200
|
.ORG $200
|
||||||
|
|
||||||
another
|
another
|
||||||
lda GETC
|
lda GETC
|
||||||
|
beq another
|
||||||
eor #$20 ; swap upper and lower case as a demo
|
eor #$20 ; swap upper and lower case as a demo
|
||||||
sta PUTC
|
sta PUTC
|
||||||
jmp another
|
jmp another
|
||||||
|
@ -209,13 +209,9 @@ class Monitor(cmd.Cmd):
|
|||||||
byte = 0
|
byte = 0
|
||||||
return byte
|
return byte
|
||||||
|
|
||||||
def blocking_getc(address):
|
|
||||||
return ord(console.getch(self.stdin))
|
|
||||||
|
|
||||||
m = ObservableMemory(addrWidth=self.addrWidth)
|
m = ObservableMemory(addrWidth=self.addrWidth)
|
||||||
m.subscribe_to_write([0xF001], putc)
|
m.subscribe_to_write([0xF001], putc)
|
||||||
m.subscribe_to_read([0xF004], getc)
|
m.subscribe_to_read([0xF004], getc)
|
||||||
m.subscribe_to_read([0xF005], blocking_getc)
|
|
||||||
|
|
||||||
self._mpu.memory = m
|
self._mpu.memory = m
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user