ROMcalls

A General Discussion forum for TI calculators

Moderator: MaxCoderz Staff

Post Reply
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

ROMcalls

Post by King Harold »

I think everyone knows them, but do you all know what it actually takes to execute just a comon bcall?
Well let me tell you that it takes a whole lot of code before it actually starts executing the romcall, it even checks which kind of calc you have through port 2 and port 21 , and maps some memory through port 6, its crazy*..
*:not the memory mapping, but the HW checking
Well it could have been worse, but you would think it shouldn't have to check the HW version at every BCALL.

Thank you Dwedit for writing a Z80Disassembler ;)
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

And that is why bcalls are slower, also the code isn't the best either.

Where is the disassemble?
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

kalan_vod wrote:Where is the disassemble?
what do you mean?
Does that mean you want to have the disassembled code? :P
I just dumped 16k, starting at 0, in an appvar, changed the extention to 8xp and disassembled it with Dwedit's Z80disassembler, I then asked the Frontend program to look at the code starting at $00EF (bcall is rst 28h so it jumps to $00EF), and then it took around 2 hours to firgure out what all that code was meant to do (but I dont fully understand it yet)
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

I found the program now, as it was what I was looking for ;).
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

Oh ok, good
going to do the same as me then? :)
User avatar
Dwedit
Maxcoderz Staff
Posts: 579
Joined: Wed 15 Dec, 2004 6:06 am
Location: Chicago!
Contact:

Post by Dwedit »

I've stepped through bcall as well, and it's not very pretty.

And it tests the hardware version to see where pages map to in apps. Bcall also handles calls between app pages. It even tests if the app is stored in a ram page or not, and refuses to switch ram pages for apps stored in RAM.
You know your hexadecimal output routine is broken when it displays the character 'G'.
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

Ahh yes, BCALL's ... Seriously though, i very rarely use bcalls as i dont always have much need for them. The only ones i find really useful are _FindSym and maybe storing stuff to OP mem.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
Post Reply