Calculator Community > ASM

Miscellaneous ASM Questions

(1/5) > >>

Sue Doenim:
I have a few small questions that I'm not sure about, but I don't want to make a separate thread for each of them, so I'm combining them all in here.
1) What RAM pages can I use within programs without having any bad consequences?
2) When an appvar is less than 16kb and is archived, will it all be on the same ROM page?
3) Can you interface with headphones beyond simply sending them signals with the ring and the tip? If so, how?
If anyone can answer these questions, or refer me to a source that as answers, I would greatly appreciate it.

Xeda112358:

--- Quote from: Sue Doenim on February 16, 2019, 05:07:27 pm ---1) What RAM pages can I use within programs without having any bad consequences?
--- End quote ---
Even numbered pages are execution protected by default, so executing code here will crash your calc. That said, you can definitely store data. On the calcs with USBs, page 83h has some data that should be preserved or restored in the first 128 bytes. Just remember that any OS routines that interact with memory or variables expect the right pages to be there.

Ram Pages (WikiTI)


--- Quote from: Sue Doenim on February 16, 2019, 05:07:27 pm ---2) When an appvar is less than 16kb and is archived, will it all be on the same ROM page?
--- End quote ---
No, you can't expect this. Variables won't cross sector boundaries (groups of four RAM pages), but they may cross pages.


--- Quote from: Sue Doenim on February 16, 2019, 05:07:27 pm ---3) Can you interface with headphones beyond simply sending them signals with the ring and the tip? If so, how?

--- End quote ---
I don't know what you mean by this, sorry :| If you want to use headphones, you have to interact directly with port 0.

Sue Doenim:
Thanks for the answers! I have just a couple more follow ups.

--- Quote from: Xeda112358 on February 16, 2019, 06:44:13 pm ---
--- Quote from: Sue Doenim on February 16, 2019, 05:07:27 pm ---1) What RAM pages can I use within programs without having any bad consequences?
--- End quote ---
Even numbered pages are execution protected by default, so executing code here will crash your calc. That said, you can definitely store data. On the calcs with USBs, page 83h has some data that should be preserved or restored in the first 128 bytes. Just remember that any OS routines that interact with memory or variables expect the right pages to be there.

Ram Pages (WikiTI)

--- End quote ---
If you overwrite the data at the start of page $83, will bcall(_fillAppBaseTable) fix that?

--- Quote from: Xeda112358 on February 16, 2019, 06:44:13 pm ---
--- Quote from: Sue Doenim on February 16, 2019, 05:07:27 pm ---3) Can you interface with headphones beyond simply sending them signals with the ring and the tip? If so, how?

--- End quote ---
I don't know what you mean by this, sorry :| If you want to use headphones, you have to interact directly with port 0.

--- End quote ---
I looked for a while, and the most info I could find/understand on output to headphones was that you have to use bits 0 and 1 of port 0 (the tip and the ring), and switch them between set and reset at a desired note's frequency (e.g. 440Hz for A4). I thought that for more high quality sound than simply beeps, you send a full byte at a time to the headphones, but after looking at the source code for TruSound, I realize that that was wrong.

Xeda112358:
Yes, bcall(_fillAppBaseTable) should be sufficient.

Sue Doenim:
Where is the edit buffer for the homescreen stored? What general guidelines should I follow when editing it?

Navigation

[0] Message Index

[#] Next page

Go to full version