rob-ng15 / Silice-Playground

Programs for the FOMU, DE10NANO and ULX3S FPGA boards, written in Silice https://github.com/sylefeb/Silice
34 stars 5 forks source link

j1eforth environment - extra ALU operations #6

Closed rob-ng15 closed 4 years ago

rob-ng15 commented 4 years ago

The J1+ CPU has ALU operations for:

In the section ( new J1+ ALU operations ) of https://github.com/rob-ng15/Silice-Playground/blob/master/DE10NANO%2BULX3S/j1eforth/j1eforth-plus/j1.4th there are two commented lines ( : 2/ ]asm t>>1 alu asm[ ; ) ( uncommenting causes error ) and ( : - ]asm n-t d-1 alu asm[ ; ) ( uncommenting causes error ).

The line t: 2/ 1 literal rshift t;``should be replaced witht: 2/ 2/ t;andt: - ( n1 n2 -- n1-n2 ) negate + t;should be replaced witht: - t;`

However removing the commenting from the above lines and changing the Forth word definitions to what should be their correct definitions locks the j1eforth environment.

rob-ng15 commented 4 years ago

Fixed in j1eforth