Hi Alex,
You can see how much RAM is used, and what your compiled program size is by examining the .lst file generated after you compile your code.
If your BASIC file name is test.bas, you should have a file named test.lst after compile. Open this .lst file to see RAM allocation, and compiled program code size.
It will look something like this depending on the PIC type, and how many variables you use;
R0 to RR2 are PBP system variables. _EADD, _EDAT and _X are variables I created. From looking at my .lst file I know 27 RAM locations are being used by my program.Code:RAM_START EQU 00020h RAM_END EQU 001EFh RAM_BANKS EQU 00004h BANK0_START EQU 00020h BANK0_END EQU 0007Fh BANK1_START EQU 000A0h BANK1_END EQU 000EFh BANK2_START EQU 00110h BANK2_END EQU 0016Fh BANK3_START EQU 00190h BANK3_END EQU 001EFh EEPROM_START EQU 02100h EEPROM_END EQU 021FFh R0 EQU RAM_START + 000h R1 EQU RAM_START + 002h R2 EQU RAM_START + 004h R3 EQU RAM_START + 006h R4 EQU RAM_START + 008h R5 EQU RAM_START + 00Ah R6 EQU RAM_START + 00Ch R7 EQU RAM_START + 00Eh R8 EQU RAM_START + 010h FLAGS EQU RAM_START + 012h GOP EQU RAM_START + 013h RM1 EQU RAM_START + 014h RM2 EQU RAM_START + 015h RR1 EQU RAM_START + 016h RR2 EQU RAM_START + 017h _EADD EQU RAM_START + 018h _EDAT EQU RAM_START + 019h _X EQU RAM_START + 01Ah
Program code size is also shown in the .lst file. Scroll down to the last line, and look at the hex number on the left.
00D0h shows that my compiled program size was 209 words.Code:+ 00D0- 0008 return
If you use an editor like MicroCode Studio, it will show the compiled program size on the lower left of the screen.




Bookmarks