ASSEMBLYS = $(SOURCES:.c=.lst)
#all: $(TARGET).elf $(TARGET).hex $(TARGET).txt
-all: $(TARGET).elf $(TARGET).hex $(TARGET).xout $(ASSEMBLYS)
+all: $(TARGET).elf $(TARGET).hex $(TARGET).xout $(ASSEMBLYS) _pc4th
#we .include this, so it doesn't make it to the auto-generated dependencies
main.o: flashboot.s
case 41: // @ ( addr -- val ) \ read directly from memory address
i = TOS >> 1;
- TOS = dirMemory[i];
+ TOS = dirMemory[(uint16_t)i];
break;
case 42: // ! ( val addr -- ) \ write directly to memory address words only!
i = popMathStack(); // address to write to
i = i >> 1;
j = popMathStack(); // value to write
- dirMemory[i] = j;
+ dirMemory[(uint16_t)i] = j;
break;
case 43: // h@ ( -- prog ) \ get end of program code space
case 66: // +! ( n addr -- ) \ *addr += n
i = popMathStack();
j = popMathStack();
- dirMemory[i] += j;
+ dirMemory[(uint16_t)i] += j;
break;
case 67: // roll ( n -- ) \ nth stack removed and placed on top
\ case 41: // @ ( addr -- val ) \ read directly from memory address
\ case 42: // ! ( val addr -- ) \ write directly to memory address words only!
-\ NOTE: Not working on PC version, fake dirMemory array needs debugging.
-\ 42 0xff00 !
-\ 0xff00 @
-\ 42 cmp
+42 0xff00 !
+0xff00 @
+42 cmp
\ case 43: // h@ ( -- progIdx ) \ get end of program code space
\ no test