The functions for sin, cos and tan, are:
Code:FSIN X,Y | X = SIN Y FCOS X,Y | X = COS Y FTAN X,Y | X = TAN Y
Take a look here:
http://www.wiremod.com/forum/cpu-tut...mentation.html
awesome tutorial!
but is there any way i can use sin, cos and tan?
that would be really helpful
The functions for sin, cos and tan, are:
Code:FSIN X,Y | X = SIN Y FCOS X,Y | X = COS Y FTAN X,Y | X = TAN Y
Take a look here:
http://www.wiremod.com/forum/cpu-tut...mentation.html
"If anybody says he can think about quantum physics without getting giddy, that only shows he has not understood the first thing about them."
-- Niels Bohr
hey Fox, i got a problem with the CPU, how come everytime i try to make a program, it dont work. I used the debugger tool and noticed that it showed error for output and error = 5.1-something. its makin me mad cuz i wanna learn how to use CPU.
can you please help?
(.:T_larson911:.)
"I like pie"-Jat Goodwin
<Azrael-> ryland: LOL is such a noobish thing to say.
<ryland> LOL
<Fox682> LOLLOL
<Fox682> LOL
<ryland> LOL
I don't understand how to wire a console screen too the cpu chip because the cpu has like one output which is error. Is there a another chip that i must use to get access to the cpu outputs?
Well, if you are just using console screen, wire Membus from the CPU to the console screen, and it should work... Nothing else to wire.
But if you want to use address bus for the console screen, set it up like so....
Memory1:
Offset: 0
Size: 2048
And you would wire membus to the address bus instead, and wire memory1 to the console screen.![]()
"I like pie"-Jat Goodwin
<Azrael-> ryland: LOL is such a noobish thing to say.
<ryland> LOL
<Fox682> LOLLOL
<Fox682> LOL
<ryland> LOL
Please help me... Why won't this work!
For some reason the calculations gets stuck at "Start" even though eax is not equal to 0.
Port0-out = Screen
Port1-in = Keypad
Port2-in = The defined arithemetic
Code:Start: in eax,1 out 0,eax cmp eax,0 je Start jmp Math Math: in ebx,2 cmp ebx,1 je Add cmp ebx,2 je Sub cmp ebx,3 je Mul cmp ebx,4 je Div jmp Math Add: in ebx,1 cmp ebx,0 je Add add eax,ebx jmp End Sub: in ebx,1 cmp ebx,0 je Sub sub eax,ebx jmp End Mul: in ebx,1 cmp ebx,0 je Mul mul eax,ebx jmp End Div: in ebx,1 cmp ebx,0 je Div div eax,ebx jmp End End: out 0,eax
If what you mean by "stuck" is that the calculations stop working after the first cycle, it is because you've not made an infinite loop.
I also recommend that you cease using the
And start using this instead:Code:in x,y ---------------------- out x,y
But that's maybe just me?Code:mov portx,y ---------------------- mov x,porty
Oh, and by the way (Untested):
Untested, and I doubt that's even what you're looking for.Code:_main: mov eax,port1 cmp eax,1 jne _main je calc jmp _main calc: mov eax,port2 cmp eax,1 je add cmp eax,2 je sub jmp _main add: mov eax,port3 add eax,port4 mov port0,eax jmp _main sub: mov eax,port3 sub eax,port4 mov port0,eax jmp _main
Port 1 - Go
Port 2 - Arithmetic Operation (Add/Sub, add more on your own)
Port 3 - Par1
Port 4 - Par2
Bookmarks