assembler / machine config - Remove/Change: Remove pointer-to-keypad / Change initial IP
This commit is contained in:
parent
78ac43bead
commit
f2e43888b5
|
|
@ -2,9 +2,7 @@ const { logMemory, num2hex } = require('./logging.js');
|
||||||
const {
|
const {
|
||||||
INITIAL_IP_ADDRESS,
|
INITIAL_IP_ADDRESS,
|
||||||
DISPLAY_ADDR,
|
DISPLAY_ADDR,
|
||||||
KEYPAD_ADDR,
|
|
||||||
POINTER_TO_DISPLAY,
|
POINTER_TO_DISPLAY,
|
||||||
POINTER_TO_KEYPAD
|
|
||||||
} = require('./machine.config.js');
|
} = require('./machine.config.js');
|
||||||
|
|
||||||
// 1 = verbose
|
// 1 = verbose
|
||||||
|
|
@ -190,7 +188,6 @@ function decodeInstructions(source) {
|
||||||
|
|
||||||
// Initialize memory-mapped IO -- TODO this should probably be in the CPU, not here
|
// Initialize memory-mapped IO -- TODO this should probably be in the CPU, not here
|
||||||
machineCode[POINTER_TO_DISPLAY] = DISPLAY_ADDR;
|
machineCode[POINTER_TO_DISPLAY] = DISPLAY_ADDR;
|
||||||
machineCode[POINTER_TO_KEYPAD] = KEYPAD_ADDR;
|
|
||||||
|
|
||||||
// Initialize arrays that collect code references that
|
// Initialize arrays that collect code references that
|
||||||
// have to be revisited after our first pass through the source
|
// have to be revisited after our first pass through the source
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
"INITIAL_IP_ADDRESS": 48,
|
"INITIAL_IP_ADDRESS": 29,
|
||||||
|
|
||||||
// Use these in CPU:
|
// Use these in CPU:
|
||||||
"DISPLAY_ADDR": 0,
|
"DISPLAY_ADDR": 0,
|
||||||
"KEYPAD_ADDR": 32,
|
"KEYPAD_ADDR": 27,
|
||||||
// Store the `X_ADDR`s at these addresses when assembling:
|
// Store the `DISPLAY_ADDR` at this address when assembling:
|
||||||
"POINTER_TO_DISPLAY": 33,
|
"POINTER_TO_DISPLAY": 26,
|
||||||
"POINTER_TO_KEYPAD": 34,
|
|
||||||
|
|
||||||
"KEY_MAP": {
|
"KEY_MAP": {
|
||||||
// Same layout as COSMAC VIP / CHIP-8
|
// Same layout as COSMAC VIP / CHIP-8
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue