Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

GCB Variables

2 posters

Go down  Message [Page 1 of 1]

1GCB Variables Empty GCB Variables Sun Jul 18, 2021 11:52 pm

Tonigau



I compiled a GCB source file & notice some variables don't show up in the MCU  monitor.
1.   Single line Variable declaration: Dim LP1, LP2 As Byte
2.   Bit variable declaration :   Dim DP As Bit
3.   Array Declaration:      Dim Digit_Val(4) As Byte

.    Workaround is  easy enough, Edit GCB source...  
1. single line Dim's,
2. add temp1 Var & set from bit var state,
3. add temp2 var & set from array val.
--------

For  3. the array var name is in the list but no elements show. Looking in the asm file  there is the following...

;Set aside memory locations for variables

DIGIT_VAL                        EQU 187  

;Alias variables
SYSDIGIT_VAL_0 EQU 187
SYSDIGIT_VAL_1 EQU 188
SYSDIGIT_VAL_2 EQU 189
SYSDIGIT_VAL_3 EQU 190

So maybe could use the (n) value from Dim statement & the start address from the memory location.

187 | Digit_Val(0)
188 | Digit_Val(1)
189 | Digit_Val(2)
190 | Digit_Val(3)

2GCB Variables Empty Re: GCB Variables Mon Jul 19, 2021 7:09 pm

arcachofo

arcachofo

Support for GcBasic is partial and not updated since long time.

1. Single line Variable declaration: Dim LP1, LP2 As Byte
Yes, currently this does not work.
It will de implemented eventually.
By now only single line declarations are recognized.

2. Bit variable declaration : Dim DP As Bit
Bit type currently is not recognized in simulide.
It will de implemented eventually.

3. Array Declaration: Dim Digit_Val(4) As Byte
Only Byte arrays are supported by now.
But should be declared like this (without "as byte"):
Dim Digit_Val(4)

Other arrays will de implemented eventually.

Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum