|
Forum Index : Microcontroller and PC projects : output of MEMORY command into variable?
| Author | Message | ||||
| lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3464 |
Maybe it's obvious, but I searched and didn't see anything about getting the output of the MEMORY command into a variable so it could be parsed. Is there a way to do this? PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
| disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 1042 |
What about connecting Console TX pin to COM1 RX pin and then reading the input via COM1. F4 H7FotSF4xGT |
||||
| Zonker Guru Joined: 18/08/2012 Location: United StatesPosts: 772 |
Maybe there is a "Peek" address that holds this data in the firmware memory area... I sure don't know, but maybe someone here does... I wonder if there is a list of useful things to Peek at..? |
||||
| Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3308 |
No, at this time there is no method of discovering the amount of free memory from within the program. This is my current list of peakable items: Is AUTORUN on? Returns 1 if yes or 0 if no peek(byte peek(word &H9D000090)) The current display type peek(byte peek(word &H9D000090) + 20) where: No Display = 0 SSD1963_4 = 1 SSD1963_5 = 2 SSD1963_5A = 3 SSD1963_7 = 4 SSD1963_7A = 5 SSD1963_8 = 6 ILI9341 = 7 ILI9163 = 8 ST7735 = 9 The display orientation (1 = landscape, 2 = portrait, 3 = RevL, 4 = RevP) peek(byte peek(word &H9D000090) + 21) The I/O pin used for touch CS (zero means that touch is not configured) peek(byte peek(word &H9D000090) + 22) The I/O pin used for touch INT (handy if you want to set an interrupt on touch) peek(byte peek(word &H9D000090) + 23) Is the touch calibrated? Zero means no, non zero yes. peek(word peek(word &H9D000090) + 28) The I/O pin used for the LCD CS (zero means that the LCD is not configured) peek(byte peek(word &H9D000090) + 45) The I/O pin used for the LCD CD peek(byte peek(word &H9D000090) + 44) The I/O pin used for the LCD reset peek(byte peek(word &H9D000090) + 46) The I/O pin used for the SD card CS (zero means that the SD card is not configured) peek(byte peek(word &H9D000090) + 48) What MMBasic thinks is the width of the console in characters peek(byte peek(word &H9D000090) + 5) What MMBasic thinks is the height of the console in lines peek(byte peek(word &H9D000090) + 4) Geoff Graham - http://geoffg.net |
||||
| lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3464 |
Thanks for the responses. disco4now--not practical in this circuit. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
| CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2171 |
Hi Geoff. Do you have a similar list (just the starting address?) for 5.03.15 - I haven't tested them all but the first two PEEKs give me an error on the MMX+ (144 pin jobby) > print peek(byte peek(word &H9D000090) + 20) Error: Invalid address cheers |
||||
| WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2959 |
I think Peter will have to chime in here (rather than Geoff) I agree, this list for MMX will be useful |
||||
| CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2171 |
sorry - yes you are quite correct. hi Geoff/Peter... cheers |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |