Jump to content
  • 0

What's wrong with DA$ as a variable name ?


JagV12
 Share

Question

Hi there, 

 

I'm new to C64 and X16 programming (I did Apple //e BASIC and assembly prgs ages ago).

My first program is basically a READ, POKE loop but READ DA$ issues a "ILLEGAL QUANTITY ERROR" on the X16 web emulator (it works on C64 emu). Obviously DA$ (standing for Data) is not allowed as a variable name but why ?

Edited by JagV12
Typo
Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

OK, thank you. 

Something else now (Or should I open another post ?) : Applesoft was not able to handle Hex values so I translated $xx into decimal via a subroutine. With C64 and X16, I can write POKE $xxxx, $yy but what if I use DATA ?

10 DATA $1000, $FF

20 READ A$, D$

30 A = VAL(A$) : D = VAL(D$) : REM DOES NOT WORK !!!!!

40 POKE A, D : REM WILL POKE $00 INTO ADDRESS $0000 !!!

40 PRINT A, D : REM IS SAFER

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

Please review our Terms of Use