Search found 68 matches

by qwertyface
21 Jun 2021, 08:56
Forum: Hardware and software hacking
Topic: New vCPU instructions 2.0
Replies: 95
Views: 48100

Re: New vCPU instructions 2.0

Nice. Looping works out an awful lot smaller than trying to do the whole thing in one go, and will win in cost in a lot of cases. Are you planning to do the same thing for logical and arithmetic right shift? The same broad approach would work, but the cost of repeatedly entering the right-shift tabl...
by qwertyface
15 May 2021, 07:25
Forum: Hardware and software hacking
Topic: GtForth - Forth on top of the vCPU
Replies: 9
Views: 3305

Re: GtForth - Forth on top of the vCPU

I am still far from understanding the big picture though... How do you plan to implement the words? Are you going to implement the full set of words of the Forth standard in native code (ROM)? It's hard to see the big picture when it's only half drawn. :D In ROM, yes, in native code, no. To the ext...
by qwertyface
15 May 2021, 03:51
Forum: Hardware and software hacking
Topic: Expanding ROM space
Replies: 7
Views: 2712

Re: Expanding ROM space

It's an interesting idea, but I'm not sure that it works in practice. For one thing, you can't really get out of the page without setting y. You also can't practically write much native code without writing to page zero. Bear in mind that the packing density also depends on the amount of the page gi...
by qwertyface
14 May 2021, 08:33
Forum: Hardware and software hacking
Topic: GtForth - Forth on top of the vCPU
Replies: 9
Views: 3305

Re: GtForth - Forth on top of the vCPU

Also having the vCPU emulator helped me test the system more quickly. I've also benefited from using an emulator for testing. I've got pytest/hypothesis unit tests for all of the words that I've implemented, most of which are written in a fairly high-level way . Perhaps this is something that we co...
by qwertyface
13 May 2021, 21:27
Forum: Hardware and software hacking
Topic: GtForth - Forth on top of the vCPU
Replies: 9
Views: 3305

Re: GtForth - Forth on top of the vCPU

This is really cool, congratulations! It must have been a ton of work. If I may say so, it's lovely neat source as well. I'm sure I have a lot to learn from it, in particular the work on how the Python assembler module packs code into memory. I also like your approach to self-hosting. For obvious re...
by qwertyface
04 May 2021, 11:10
Forum: Hardware and software hacking
Topic: New vCPU instructions 2.0
Replies: 95
Views: 48100

Re: New vCPU instructions 2.0

Just a couple of comments: I see you've moved code some code to page 0. If I ever complete and merge my Forth, I need a short routine in page 0 (currently 5 instructions). Could you try to leave at least that much space for my purposes? The location isn't important. I see that you're making changes ...
by qwertyface
02 Dec 2020, 10:15
Forum: Hardware and software hacking
Topic: List of possible Gigatron mods
Replies: 14
Views: 10139

Re: List of possible Gigatron mods

This got me thinking. Who else has written (native) code for the Gigatron? Obviously Marcel and there is one other project I'm aware of - https://hackaday.io/project/168293-gigatron-forth Working directly with the op-codes is a significant undertaking and it looks like the Gigatron Forth project mi...
by qwertyface
28 Nov 2020, 14:54
Forum: Hardware and software hacking
Topic: The Shift Table
Replies: 4
Views: 2452

Re: The Shift Table

I think I get it now. The effect of the formula is to set the first "insignificant" bit to a 0, and all the bits below to 1. So shifts by 1 all get indexes of the form xxxxxxx0. Shifts by two get indexes of the form xxxxxx01, and shifts by three get indexes of the form xxxxx011. This means...
by qwertyface
28 Nov 2020, 12:41
Forum: Hardware and software hacking
Topic: The Shift Table
Replies: 4
Views: 2452

Re: The Shift Table

Thanks at67 - but I really meant how is the lookup table constructed. I think I partly get it: For a shift of 6 places, there are only two of the original bits in the result, so it only needs 2²=4 rows in the table. For 5 places there 3 bits, so 8 rows, and so on, up to shifts of 1 bit, which have 7...
by qwertyface
27 Nov 2020, 17:36
Forum: Hardware and software hacking
Topic: The Shift Table
Replies: 4
Views: 2452

The Shift Table

I've just started trying to implement arbitrary left and right bit shifts - I need to be able to shift 16 bit quantities by up to 15 places. This led to me looking at the right shift table in page 5 of the ROM. I think I understand how to use it (although I think doing so would require fitting my ow...