Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Freyaday on September 30, 2011, 10:02:53 pm

Title: Bitulator
Post by: Freyaday on September 30, 2011, 10:02:53 pm
Today, after reading about some contest entries to a contest to produce an awful four-function calculator.
Inspired, I decided to make my own.
Here it is, the Bitulator.
Spoiler For Code:
Quote from: Axe
.BITUL8R
"THE 16 BITULATOR, UTILIZING THE LATEST IN 8.8 TECHNOLOGY?"
Lbl START
If getKey(15)
Returnr
End
sub(INP)
Atheta
ClrHome
While getKey(54)
End
sub(INP)
Lbl 0
ClrHome
Disp "+-*/"
Repeat getKeyK
End
!If K-10
Lbl 10
Repeat 0
randB
If getKey(15)
Returnr
End
End!If B^2
!If B^3
Goto 10
End
!If B^5
Goto 10
End
!If B^7
Goto 10
End
Else!If K-11
Lbl 11
Repeat 0
randB
If getKey(15)
Returnr
End
End!If B^3
!If B^2
Goto 11
End
!If B^5
Goto 11
End
!If B^7
Goto 11
End
Else!If K-12
Lbl 12
Repeat 0
randB
If getKey(15)
Returnr
End
End!If B^5
!If B^2
Goto 12
End
!If B^3
Goto 12
End
!If B^7
Goto 12
End
Else!If K-13
Lbl 13
Repeat 0
randB
If getKey(15)
Returnr
End
End!If B^7
!If B^2
Goto 13
End
!If B^3
Goto 13
End
!If B^5
Goto 13
End
Else
Goto 0
End
sub(I)
Lbl I
If getKey(15)
Returnr
End
!If B-0
sub(START)
Else!If B^2
sub(ADD)
Else!If B^3
sub(SUB)
Else!If B^5
sub(PROD)
Else!If B^7
sub(DIV)
End
Lbl ADD
For(Q,0,65535)
If getKey(15)
Returnr
End
A++
theta--
If getKey(0)
Disp A>Hex,theta>Hex,Q>Hex,i
End
!If theta
Goto Atheta
End
End
Lbl Atheta
0B
0B
sub(I)
Lbl SUB
~AA
sub(ADD)
Lbl PROD
theta**AA
0B
sub(I)
Lbl DIV
A^^-1A
sub(PROD)
Lbl INP
ClrHome
Repeat getKey(54)
Output(0,,A>Hex
EndIf getKey(0)
If getKey(15)
Returnr
End
!If getKey(54)
If getKey(1)
A++
End
If getKey(2)
A++
End
If getKey(3)
A--
End
If getKey(4)
A--
End
Goto INP
End

Generated by the BBify'r (http://clrhome.org/resources/bbify/ (http://clrhome.org/resources/bbify/))
Beware, use it too many times without exiting the program, and the stack can start corrupting stuff. When it starts displaying noncharacters instead of numbers, that's a good sign it's about time to quit.
The source is also attached, in case you like your sources in 8xp form
Title: Re: Bitulator
Post by: ralphdspam on September 30, 2011, 10:29:27 pm
What the!? 
EDIT: Ooh, I wonder how much it takes to cause the stack to overflow...
Title: Re: Bitulator
Post by: Freyaday on October 01, 2011, 10:36:10 pm
According to geekboy, it'll take about 40 subroutine calls for the stack to start overwriting stuff, meaning that you have about nine or ten calculations to use before it starts overwriting stuff. I think.
Title: Re: Bitulator
Post by: boot2490 on October 06, 2011, 11:37:47 am
What does it do?
Title: Re: Bitulator
Post by: Freyaday on October 06, 2011, 05:26:41 pm
It calculates.
Title: Re: Bitulator
Post by: parserp on October 06, 2011, 06:18:20 pm
It calculates.
calculates what?
Title: Re: Bitulator
Post by: Yeong on October 06, 2011, 06:19:20 pm
It calculates.
calculates what?
calculates stuff like normal 4-function calculator XD
Title: Re: Bitulator
Post by: squidgetx on October 06, 2011, 07:17:11 pm
I wonder if it is possible to write a z80 emulator for calcs. Of course it would be slow as crap but.....
Title: Re: Bitulator
Post by: calc84maniac on October 06, 2011, 07:25:53 pm
I wonder if it is possible to write a z80 emulator for calcs. Of course it would be slow as crap but.....
http://www.ticalc.org/archives/files/fileinfo/377/37796.html (http://www.ticalc.org/archives/files/fileinfo/377/37796.html)
Title: Re: Bitulator
Post by: Freyaday on October 06, 2011, 09:54:13 pm
Yeong "Bridge" Jin_Cool:
Almost right: It's an ABnormal 4func calculator!
Title: Re: Bitulator
Post by: willrandship on December 19, 2011, 06:35:09 pm
And actually the fact that the CPU is virtually Identical lends to faster speeds than you'd expect. TI-Boy is another example of a fairly speedy z80 emu for the 84+.