Search found 367 matches

by lb3361
30 Mar 2021, 14:38
Forum: Hardware and software hacking
Topic: New vCPU instructions 2.0
Replies: 95
Views: 54281

Re: New vCPU instructions 2.0

I know you have little love for CMPHI and CMPHU but I have two arguments in their favor: 1) Backward compatibility. Cpuv5 was a strict superset of cpuv4. It is annoying if cpuv6 is not a superset of cpuv5. 2) In C you'll find plenty of loops written as "for(i=0; i<n; i++) { .... }" Each of...
by lb3361
26 Mar 2021, 15:19
Forum: Hardware and software hacking
Topic: New vCPU instructions 2.0
Replies: 95
Views: 54281

Re: New vCPU instructions 2.0

I'd be glad if you put your experimental rom in a github clone of gigatron-rom. I have lost track of the changes at this point :-).
by lb3361
26 Mar 2021, 08:12
Forum: Hardware and software hacking
Topic: New vCPU instructions 2.0
Replies: 95
Views: 54281

Re: New vCPU instructions 2.0

Hmm. I am writing on the C code generator. I am at the same time targeting the current vcpu and trying to plan ahead for your additions as well All your additions change the character of the VCPU from a purely AC based machine to a machine that can use the whole zero page as registers. Only a few in...
by lb3361
21 Mar 2021, 20:33
Forum: Hardware and software hacking
Topic: New vCPU instructions 2.0
Replies: 95
Views: 54281

Re: New vCPU instructions 2.0

As a matter of fact, since you have POKEI,DOKEI,PEEKV,DEEKV, you might like the following naming scheme: MOVV --> POKEA(z) : Writes byte at zero page location z into address AC MOVVW --> DOKEA(z) : Writes word at zero page location z,z+1 into addresses AC,AC+1. MOVA --> PEEKA(z) : Reads byte at addr...
by lb3361
21 Mar 2021, 11:21
Forum: Hardware and software hacking
Topic: New vCPU instructions 2.0
Replies: 95
Views: 54281

Re: New vCPU instructions 2.0

What about ADDB z : Adds the byte at zero page address z to the 16 bits vAC. This would facilitate multibyte arithmetic for longs and floats with sequences such as LD(a) # first byte ADDB(b) ST(a) for i in range(1,3): LD(vAC+i) # get carry ADDB(a+i) # byte b z ADDB(b+i) ST(a+i) Alternatively ADDWV z...
by lb3361
11 Mar 2021, 16:23
Forum: Hardware and software hacking
Topic: New vCPU instructions 2.0
Replies: 95
Views: 54281

Re: New vCPU instructions 2.0

I am planning on replacing these with hand crafted sys calls, (which are coded the same way as vCPU instructions without the maxtick limitation), they will obviously be specific to the array topology of gtBASIC, but there is plenty of ROM space to create helpers/accessors for other languages as wel...
by lb3361
10 Mar 2021, 22:05
Forum: Hardware and software hacking
Topic: New vCPU instructions 2.0
Replies: 95
Views: 54281

Re: New vCPU instructions 2.0

You're right. I did not understand your MOVEBA. What I would like are instructions to avoid what you call the instruction "carnage" in both word and byte form. POKEA and DOKEA are good enough names. In fact the carnage appears whenever you want to do write into a field of a structure locat...
by lb3361
10 Mar 2021, 12:09
Forum: Hardware and software hacking
Topic: New vCPU instructions 2.0
Replies: 95
Views: 54281

Re: New vCPU instructions 2.0

Nobody knows better which instructions would help the basic compiler. I was mostly thinking about what's needed to resurrect the C compiler to be honest. The main issues for a C compiler are to make sure we can do move things around easily, and in particular easily enough to deal with real stack fra...
by lb3361
10 Mar 2021, 01:42
Forum: Hardware and software hacking
Topic: New vCPU instructions 2.0
Replies: 95
Views: 54281

Re: New vCPU instructions 2.0

I am so excited by your vSPH changed that I couldn't wait. I looked carefully at the dev.rom and, to my surprise, I was able to implement the change in the same footprint, just by squeezing instructions in the implementation of PUSH, POP, LDLW, and STLW. PUSH and POP are just as fast as they were. L...
by lb3361
08 Mar 2021, 22:43
Forum: Hardware and software hacking
Topic: gtBASIC
Replies: 435
Views: 117719

Re: gtBASIC

Is there a comprehensive reference documentation that explains all the GTBasic keywords ?