#garfield Logs

Jun 30 2024

#garfield Calendar

04:07 AM VanUnamed_ is now known as VanUnamed
11:58 AM VanUnamed_ is now known as VanUnamed
03:17 PM polprog: rue_mohr: It's i instructions, the encoding is not important now
03:17 PM polprog: I am using 8 words in the prototype interpreter
03:18 PM polprog: but in the final version it will be just 8 integer values
03:18 PM polprog: 0-7
03:18 PM polprog: so 3 bits
03:18 PM polprog: The problem is that i now have an instruction set made of the following instructions
03:18 PM polprog: code insn
03:18 PM polprog: -------------------------
03:18 PM polprog: 0 ZERO a <- 0;
03:18 PM polprog: 1 INC a++;
03:18 PM polprog: 2 ROL rotate a left
03:18 PM polprog: 3 SWAP tmp <- a; a <- d; d <- tmp;
03:18 PM polprog: 4 PUSH sp++; stack[sp] <- a;
03:18 PM polprog: 5 POP a <- stack[sp]; sp--;
03:19 PM polprog: 6 JZ iff a == 0 then ip <- a - 1;
03:19 PM polprog: 7 JP ip <- a - 1;
03:19 PM polprog: The problem is I really need the ROL instruction, it makes assembling constants easy and short unlike brainfuck
03:20 PM polprog: The problem is that there is no CALL instruction or any other thing that lets me transfer the instruction pointer to any of the registers
03:20 PM polprog: also JZ does not make sense at all here
03:21 PM polprog: i could make JZ be "iff a == 0 then ip <- d", or .. "ip <- d+N" where N is some integer that makes sense
03:22 PM polprog: and remove JP to make it a CALL instruction, which would put the return address on stack and jump to it
03:46 PM rue_mohr: hehe
03:46 PM rue_mohr: I'v been down this road
03:48 PM rue_mohr: brainfuck has seperate program and data memory
03:49 PM rue_mohr: is this part of curiosity or assignment?
05:50 PM polprog: it's part of curiosity
05:50 PM polprog: i am trying to come up with a script that can execute the same program even if some of the bits inside it are flipped
05:50 PM polprog: I came up with the idea to use a particular encoding that maps a lot of states (256) to just 8 symbols
05:50 PM polprog: hence i need 8 instructions
05:51 PM polprog: brainfuck is nice but I think i can come up with something more friendly to program
05:51 PM polprog: the key feature is that i want the "vm" to be able to talk to the OS via syscalls
05:52 PM polprog: a jump to instruction 0 is treated separately and the script that executes the instruction set executes a syscall
06:59 PM Tom_L: rue_mohr, experimental flex ui:
06:59 PM Tom_L: http://tom-itx.no-ip.biz:443/~webpage/cnc/JT-SHOP/flexgui/mill_3/Screens/Gcode.png
06:59 PM Tom_L: http://tom-itx.no-ip.biz:443/~webpage/cnc/JT-SHOP/flexgui/mill_3/Screens/Manual.png
06:59 PM Tom_L: http://tom-itx.no-ip.biz:443/~webpage/cnc/JT-SHOP/flexgui/mill_3/Screens/Touch_off_MDI.png
06:59 PM Tom_L: http://tom-itx.no-ip.biz:443/~webpage/cnc/JT-SHOP/flexgui/mill_3/Screens/Status.png
07:58 PM rue_mohr: Tom_L, looking fancy