mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-20 09:04:43 +00:00
Begins work to fetch array indexes.
This commit is contained in:
parent
e23f7f6905
commit
faf6b2dcdd
1 changed files with 66 additions and 60 deletions
|
@ -7372,17 +7372,15 @@ SUB DebugMode
|
||||||
DO WHILE LEN(temp$)
|
DO WHILE LEN(temp$)
|
||||||
tempIndex& = CVL(LEFT$(temp$, 4))
|
tempIndex& = CVL(LEFT$(temp$, 4))
|
||||||
temp$ = MID$(temp$, 5)
|
temp$ = MID$(temp$, 5)
|
||||||
IF usedVariableList(tempIndex&).watch THEN
|
cmd$ = ""
|
||||||
cmd$ = ""
|
IF LEN(usedVariableList(tempIndex&).subfunc) = 0 THEN
|
||||||
IF LEN(usedVariableList(tempIndex&).subfunc) = 0 THEN
|
cmd$ = "global var:"
|
||||||
cmd$ = "global var:"
|
ELSE
|
||||||
ELSE
|
cmd$ = "local var:"
|
||||||
cmd$ = "local var:"
|
END IF
|
||||||
END IF
|
IF LEN(cmd$) THEN
|
||||||
IF LEN(cmd$) THEN
|
cmd$ = cmd$ + MKL$(tempIndex&) + MKL$(usedVariableList(tempIndex&).localIndex) + usedVariableList(tempIndex&).subfunc
|
||||||
cmd$ = cmd$ + MKL$(tempIndex&) + MKL$(usedVariableList(tempIndex&).localIndex) + usedVariableList(tempIndex&).subfunc
|
GOSUB SendCommand
|
||||||
GOSUB SendCommand
|
|
||||||
END IF
|
|
||||||
END IF
|
END IF
|
||||||
LOOP
|
LOOP
|
||||||
END IF
|
END IF
|
||||||
|
@ -7391,60 +7389,68 @@ SUB DebugMode
|
||||||
address%& = _CV(_OFFSET, MID$(value$, 5))
|
address%& = _CV(_OFFSET, MID$(value$, 5))
|
||||||
usedVariableList(tempIndex&).baseAddress = address%&
|
usedVariableList(tempIndex&).baseAddress = address%&
|
||||||
varType$ = usedVariableList(tempIndex&).varType
|
varType$ = usedVariableList(tempIndex&).varType
|
||||||
IF INSTR(varType$, "STRING *") THEN varType$ = "STRING"
|
IF usedVariableList(tempIndex&).isarray THEN
|
||||||
SELECT CASE varType$
|
'TODO
|
||||||
CASE "_BYTE", "_UNSIGNED _BYTE", "BYTE", "UNSIGNED BYTE": varSize& = LEN(dummy%%)
|
ELSE
|
||||||
CASE "INTEGER", "_UNSIGNED INTEGER", "UNSIGNED INTEGER": varSize& = LEN(dummy%)
|
IF INSTR(varType$, "STRING *") THEN varType$ = "STRING"
|
||||||
CASE "LONG", "_UNSIGNED LONG", "UNSIGNED LONG": varSize& = LEN(dummy&)
|
SELECT CASE varType$
|
||||||
CASE "_INTEGER64", "_UNSIGNED _INTEGER64", "INTEGER64", "UNSIGNED INTEGER64": varSize& = LEN(dummy&&)
|
CASE "_BYTE", "_UNSIGNED _BYTE", "BYTE", "UNSIGNED BYTE": varSize& = LEN(dummy%%)
|
||||||
CASE "SINGLE": varSize& = LEN(dummy!)
|
CASE "INTEGER", "_UNSIGNED INTEGER", "UNSIGNED INTEGER": varSize& = LEN(dummy%)
|
||||||
CASE "DOUBLE": varSize& = LEN(dummy#)
|
CASE "LONG", "_UNSIGNED LONG", "UNSIGNED LONG": varSize& = LEN(dummy&)
|
||||||
CASE "_FLOAT", "FLOAT": varSize& = LEN(dummy##)
|
CASE "_INTEGER64", "_UNSIGNED _INTEGER64", "INTEGER64", "UNSIGNED INTEGER64": varSize& = LEN(dummy&&)
|
||||||
CASE "_OFFSET", "_UNSIGNED _OFFSET", "OFFSET", "UNSIGNED OFFSET": varSize& = LEN(dummy%&)
|
CASE "SINGLE": varSize& = LEN(dummy!)
|
||||||
CASE "STRING": varSize& = LEN(dummy%&) + LEN(dummy&)
|
CASE "DOUBLE": varSize& = LEN(dummy#)
|
||||||
END SELECT
|
CASE "_FLOAT", "FLOAT": varSize& = LEN(dummy##)
|
||||||
cmd$ = "get address:" + MKL$(tempIndex&) + MKI$(1) + MKL$(varSize&) + _MK$(_OFFSET, address%&)
|
CASE "_OFFSET", "_UNSIGNED _OFFSET", "OFFSET", "UNSIGNED OFFSET": varSize& = LEN(dummy%&)
|
||||||
GOSUB SendCommand
|
CASE "STRING": varSize& = LEN(dummy%&) + LEN(dummy&)
|
||||||
|
END SELECT
|
||||||
|
cmd$ = "get address:" + MKL$(tempIndex&) + MKI$(1) + MKL$(varSize&) + _MK$(_OFFSET, address%&)
|
||||||
|
GOSUB SendCommand
|
||||||
|
END IF
|
||||||
CASE "address read"
|
CASE "address read"
|
||||||
tempIndex& = CVL(LEFT$(value$, 4))
|
tempIndex& = CVL(LEFT$(value$, 4))
|
||||||
sequence% = CVI(MID$(value$, 5, 2))
|
sequence% = CVI(MID$(value$, 5, 2))
|
||||||
recvData$ = MID$(value$, 7)
|
recvData$ = MID$(value$, 7)
|
||||||
varType$ = usedVariableList(tempIndex&).varType
|
IF usedVariableList(tempIndex&).isarray THEN
|
||||||
IF INSTR(varType$, "STRING *") THEN varType$ = "STRING"
|
'TODO
|
||||||
SELECT CASE varType$
|
ELSE
|
||||||
CASE "_BYTE", "BYTE": recvData$ = STR$(_CV(_BYTE, recvData$))
|
varType$ = usedVariableList(tempIndex&).varType
|
||||||
CASE "_UNSIGNED _BYTE", "UNSIGNED BYTE": recvData$ = STR$(_CV(_UNSIGNED _BYTE, recvData$))
|
IF INSTR(varType$, "STRING *") THEN varType$ = "STRING"
|
||||||
CASE "INTEGER": recvData$ = STR$(_CV(INTEGER, recvData$))
|
SELECT CASE varType$
|
||||||
CASE "_UNSIGNED INTEGER", "UNSIGNED INTEGER": recvData$ = STR$(_CV(_UNSIGNED INTEGER, recvData$))
|
CASE "_BYTE", "BYTE": recvData$ = STR$(_CV(_BYTE, recvData$))
|
||||||
CASE "LONG": recvData$ = STR$(_CV(LONG, recvData$))
|
CASE "_UNSIGNED _BYTE", "UNSIGNED BYTE": recvData$ = STR$(_CV(_UNSIGNED _BYTE, recvData$))
|
||||||
CASE "_UNSIGNED LONG", "UNSIGNED LONG": recvData$ = STR$(_CV(_UNSIGNED LONG, recvData$))
|
CASE "INTEGER": recvData$ = STR$(_CV(INTEGER, recvData$))
|
||||||
CASE "_INTEGER64", "INTEGER64": recvData$ = STR$(_CV(_INTEGER64, recvData$))
|
CASE "_UNSIGNED INTEGER", "UNSIGNED INTEGER": recvData$ = STR$(_CV(_UNSIGNED INTEGER, recvData$))
|
||||||
CASE "_UNSIGNED _INTEGER64", "UNSIGNED INTEGER64": recvData$ = STR$(_CV(_UNSIGNED _INTEGER64, recvData$))
|
CASE "LONG": recvData$ = STR$(_CV(LONG, recvData$))
|
||||||
CASE "SINGLE": recvData$ = STR$(_CV(SINGLE, recvData$))
|
CASE "_UNSIGNED LONG", "UNSIGNED LONG": recvData$ = STR$(_CV(_UNSIGNED LONG, recvData$))
|
||||||
CASE "DOUBLE": recvData$ = STR$(_CV(DOUBLE, recvData$))
|
CASE "_INTEGER64", "INTEGER64": recvData$ = STR$(_CV(_INTEGER64, recvData$))
|
||||||
CASE "_FLOAT", "FLOAT": recvData$ = STR$(_CV(_FLOAT, recvData$))
|
CASE "_UNSIGNED _INTEGER64", "UNSIGNED INTEGER64": recvData$ = STR$(_CV(_UNSIGNED _INTEGER64, recvData$))
|
||||||
CASE "_OFFSET", "OFFSET": recvData$ = STR$(_CV(_OFFSET, recvData$))
|
CASE "SINGLE": recvData$ = STR$(_CV(SINGLE, recvData$))
|
||||||
CASE "_UNSIGNED _OFFSET", "UNSIGNED OFFSET": recvData$ = STR$(_CV(_UNSIGNED _OFFSET, recvData$))
|
CASE "DOUBLE": recvData$ = STR$(_CV(DOUBLE, recvData$))
|
||||||
CASE "STRING"
|
CASE "_FLOAT", "FLOAT": recvData$ = STR$(_CV(_FLOAT, recvData$))
|
||||||
IF sequence% = 1 THEN
|
CASE "_OFFSET", "OFFSET": recvData$ = STR$(_CV(_OFFSET, recvData$))
|
||||||
IF LEN(dummy%&) = 8 THEN
|
CASE "_UNSIGNED _OFFSET", "UNSIGNED OFFSET": recvData$ = STR$(_CV(_UNSIGNED _OFFSET, recvData$))
|
||||||
address%& = _CV(_INTEGER64, LEFT$(recvData$, 8)) 'Pointer to data
|
CASE "STRING"
|
||||||
usedVariableList(tempIndex&).address = address%&
|
IF sequence% = 1 THEN
|
||||||
strLength& = CVL(MID$(recvData$, 9))
|
IF LEN(dummy%&) = 8 THEN
|
||||||
usedVariableList(tempIndex&).strLength = strLength&
|
address%& = _CV(_INTEGER64, LEFT$(recvData$, 8)) 'Pointer to data
|
||||||
ELSE
|
usedVariableList(tempIndex&).address = address%&
|
||||||
address%& = _CV(LONG, LEFT$(recvData$, 4)) 'Pointer to data
|
strLength& = CVL(MID$(recvData$, 9))
|
||||||
usedVariableList(tempIndex&).address = address%&
|
usedVariableList(tempIndex&).strLength = strLength&
|
||||||
strLength& = CVL(MID$(recvData$, 5))
|
ELSE
|
||||||
usedVariableList(tempIndex&).strLength = strLength&
|
address%& = _CV(LONG, LEFT$(recvData$, 4)) 'Pointer to data
|
||||||
|
usedVariableList(tempIndex&).address = address%&
|
||||||
|
strLength& = CVL(MID$(recvData$, 5))
|
||||||
|
usedVariableList(tempIndex&).strLength = strLength&
|
||||||
|
END IF
|
||||||
|
cmd$ = "get address:" + MKL$(tempIndex&) + MKI$(2) + MKL$(strLength&) + _MK$(_OFFSET, address%&)
|
||||||
|
GOSUB SendCommand
|
||||||
|
GOTO vwatch_string_seq1_done
|
||||||
END IF
|
END IF
|
||||||
cmd$ = "get address:" + MKL$(tempIndex&) + MKI$(2) + MKL$(strLength&) + _MK$(_OFFSET, address%&)
|
END SELECT
|
||||||
GOSUB SendCommand
|
usedVariableList(tempIndex&).mostRecentValue = recvData$
|
||||||
GOTO vwatch_string_seq1_done
|
vwatch_string_seq1_done:
|
||||||
END IF
|
END IF
|
||||||
END SELECT
|
|
||||||
usedVariableList(tempIndex&).mostRecentValue = recvData$
|
|
||||||
vwatch_string_seq1_done:
|
|
||||||
IF PauseMode THEN GOSUB UpdateDisplay
|
IF PauseMode THEN GOSUB UpdateDisplay
|
||||||
CASE "current sub"
|
CASE "current sub"
|
||||||
currentSub$ = value$
|
currentSub$ = value$
|
||||||
|
|
Loading…
Reference in a new issue