sectorforth
sectorforth copied to clipboard
sectorforth is a 16-bit x86 Forth that fits in a 512-byte boot sector.
the following code manipulates the return stack to cause the caller of exit to, uhm, exit: : exit>> rp@ @ \ the return address points to semicolon rp@ 2 +...
the zeroequals 0= primitive can be written as: pop ax cmp ax,1 sbb ax,ax push ax for a savings of 2 bytes and it doesn't require a 386 !
I think what you will find is that 0= can be made to equal to logical not as long as anything which is nonzero is truthy. Since 0= can mean...
We can derive 0= very early in a .f file. Sweeping all the 1s in a number up ( dup 2* or ), repeatedly, sets bit 15 if non zero....
Hi, I'm a newbie to Forth but I'm blown away by its simplicity and power. I've been playing around with a sectorforth image and entering some samples, and one thing...