aboutsummaryrefslogtreecommitdiff
path: root/core.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-02-11 12:28:42 +0100
committerDimitri Sokolyuk <demon@dim13.org>2018-02-11 12:28:42 +0100
commitc2c1402d532ebf3cfd8ef8d24f319fa071194a50 (patch)
tree32ba6923aa0874d0ac3377fbdb6773ddf95e782e /core.go
parentb0338898e59cb90ea82c4cacd3dc9ec2db5a5486 (diff)
move io ops to lower address range for single instruction literals
Diffstat (limited to 'core.go')
-rw-r--r--core.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/core.go b/core.go
index 2c262b8..b06c029 100644
--- a/core.go
+++ b/core.go
@@ -70,9 +70,9 @@ func (c *Core) writeAt(addr, value uint16) error {
c.memory[addr>>1] = value
}
switch addr {
- case 0xf000: // key
+ case 0x7000: // key
c.console.Write(value)
- case 0xf002: // bye
+ case 0x7002: // bye
return ErrStop
}
return nil
@@ -83,9 +83,9 @@ func (c *Core) readAt(addr uint16) uint16 {
return c.memory[addr>>1]
}
switch addr {
- case 0xf000: // tx!
+ case 0x7000: // tx!
return c.console.Read()
- case 0xf001: // ?rx
+ case 0x7001: // ?rx
return c.console.Len()
}
return 0