The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GOTO (arithmetical expression)
#1
Hello!

Could anyone tell me how I can simulate "GOTO (arithmetical expression)":

ex:

Code:
N can have a value between 1 and 20 GOTO (1000+(N*10))

I need to assign values ​​to an array depends on the value "N", I had thought something like this:

Code:
ASM ORG 62000 DEFB 12,5,8,11,12,11,4,11,(...) END ASM DIM P(7) AS UBYTE ... N=20 ... FOR B=0 TO 7 P(B)=PEEK (62000+N+B) NEXT B

Is this efficient?

Is there a danger that the program itself erase the data stored at positions 62000?

THANKS
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)