Memory Checker, my first Assembly program, is more developed now, so I'm ready to release it.

Memory Checker is a simple program that tells the user how much RAM and Archive Memory he has left, out of the maximum for his calculator. The interface is very simple and easy to understand and it is a DoorsCS7 or Higher Program.

Note: The Archive Routines were made by Runer112.

What do you think?

Executable.
Source.
Not to be a pain in the neck, but have you tried hovering over the memory icon on the Doors CS desktop?
KermMartian wrote:
Not to be a pain in the neck, but have you tried hovering over the memory icon on the Doors CS desktop?


Not to be a pain the neck, but have you haver heard of this?
ScoutDavid wrote:
KermMartian wrote:
Not to be a pain in the neck, but have you tried hovering over the memory icon on the Doors CS desktop?


Not to be a pain the neck, but have you haver heard of this?
No need to be mean and sarcastic; I didn't know if you new about the memory tools in Doors CS. Razz Also, there's a bcall for getting the amount of free Archive that I think may be simpler than Runer's method.
I did know about the memory tool and what b_call is that?
ScoutDavid wrote:
I did know about the memory tool and what b_call is that?
It's _ChkFreeArc. From Doors CS itself:


Code:
   bcall(_ChkFreeArc)
   ld hl,0839Fh
   ld d,(hl)
   inc hl
   ld e,(hl)
   inc hl
   ld a,(hl)   ;don't care about low byte @$83A2 though
KermM, Runer112's routine returns the same Current Archive that is in the MEMORY Menu and that one (if it's DoorsCS's one) seems to be a bit difference.

TI didn't use their own routine?
ScoutDavid wrote:
KermM, Runer112's routine returns the same Current Archive that is in the MEMORY Menu and that one (if it's DoorsCS's one) seems to be a bit difference.

TI didn't use their own routine?
How much is it off by? Orders of magnitude, or a few bytes?
In my calc, DCS points to 1374K/1536K.

MEM CHECK points to 1407144K/1540096K.

Neither magnitude nor just a few bytes.

The MEM Menu says:

1407K of free ARC.
Haha, that's hilarious. It's a difference between kilobytes (1KB = 1024 bytes) and kibibytes (1KiB = 1000 bytes). 1407/1.024 = 1.374. That means that Mem Check and the Memory Menu are both counting in 1000 bytes = 1KB, which is wrong. Doors CS is properly dividing by 1024, since 1KB = 1024 bytes.
KermMartian wrote:
Haha, that's hilarious. It's a difference between kilobytes (1KB = 1024 bytes) and kibibytes (1KiB = 1000 bytes). 1407/1.024 = 1.374. That means that Mem Check and the Memory Menu are both counting in 1000 bytes = 1KB, which is wrong. Doors CS is properly dividing by 1024, since 1KB = 1024 bytes.

Actually, Kerm, kibibytes are counted in 1024s and kilobytes by 1000. Kibi=KIlo+BInary. 1024 is a power of 2; 1000 is not. That's how I remember.
Nice deduction there, but it's not a huge differenece, I guess.
Technomonkey, whoops, my mistake; thanks for catching that. Smile David, yeah, not a big difference at all. I am sure we're all using the same ROM call but dividing by 1000 and 1024 respectively.
Either way, I was more interested in a code opinion, so what does my code look like?

It can be found here.
Everything of the form:


Code:
  ld a,YY
  ld (penRow),a
  ld a,XX
  ld (penCol),a
can be converted to the form:


Code:
  ld hl,(YY*256)+XX
  ld (pencol),hl
to produce code of 6 bytes instead of 10 bytes. Just be sure not to trash an hl that you need; you can use de instead if necessary. You can do a similar trick with ld h,AA \ ld l,BB: make it ld hl,(AA*256)+BB to save a byte.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement