Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:22 09 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : output of MEMORY command into variable?

Author Message
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3464
Posted: 08:15am 16 Mar 2017
Copy link to clipboard 
Print this post

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: Australia
Posts: 1042
Posted: 11:45am 16 Mar 2017
Copy link to clipboard 
Print this post

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 States
Posts: 772
Posted: 03:36pm 16 Mar 2017
Copy link to clipboard 
Print this post

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: Australia
Posts: 3308
Posted: 08:07pm 16 Mar 2017
Copy link to clipboard 
Print this post

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 States
Posts: 3464
Posted: 02:58am 17 Mar 2017
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 2171
Posted: 06:04am 28 Mar 2017
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 2959
Posted: 08:11am 28 Mar 2017
Copy link to clipboard 
Print this post

  CaptainBoing said   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)


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 Kingdom
Posts: 2171
Posted: 09:29am 28 Mar 2017
Copy link to clipboard 
Print this post

sorry - yes you are quite correct.

hi Geoff/Peter...


cheers
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025