Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Can't the LOAD command be used in a basic program?
2007-04-18 20:22
Shadow
Account closed

Registered: Apr 2002
Posts: 355
Can't the LOAD command be used in a basic program?

1 LOAD"ROUTINE",8,1
2 SYS 49152
RUN

Ends up in a endless loop, so I guess it doesn't do what I expect it to do...

(This may seem stupid, but it would be very handy for me when crossdeving for the DTV, as I need to load the files from 64HDD all the time, with this I could just do "run" to load the lastest routine from disk and execute)
 
... 23 posts hidden. Click here to view all posts....
 
2007-04-19 09:11
Oswald

Registered: Apr 2002
Posts: 5076
Jack, right.
2007-04-19 09:11
WVL

Registered: Mar 2002
Posts: 889
Quote: "with this I could just do "run" to load the lastest routine from disk and execute"

Does this imply that a new RUN actually resets all basic vars to 0?

I.e.

RUN => Reset vars and restart program
LOAD => Only restarts program

?

/Andreas


yes. you can get around it with CONT i think.. (of maybe you had to use GOTO, can't remember)
2007-04-19 09:17
Oswald

Registered: Apr 2002
Posts: 5076
I have coded a lot in basic, and I dont remember ever finding that cont does its job. It ended up always in "?cant continue". To go a bit off topic, you could do some nice tricks with basic. For example you could print new program lines on the screen, then fill the keyboard buffer with some 'returns'. Then put the cursor at the right place exit the program, and let the system and the 'returns' in the keybuffer add the new lines to your program, which were ended with a run 'linenumber'. ;) worked like a charm for generating DATA lines automagically.
2007-04-19 09:24
enthusi

Registered: May 2004
Posts: 675
not THAT much harder to poke them into memory, including the data-token and the new basic-end.
2007-04-19 09:37
Graham
Account closed

Registered: Dec 2002
Posts: 990
@Oswald: You cannot continue if the BASIC-program has been changed. If you just change variables or just LIST etc you can continue.
2007-04-19 12:54
TDJ

Registered: Dec 2001
Posts: 1879
Quote: :PPP right I am...

devia, I was ofcourse way too rude, just please dont explain one of the most simplest basic programs in the universe.

the key was that the program restarts, but there's no variable reset. An in depth ROM dissecting explanation on this would be welcome.


One of the 'most simplest' (sic)? There's not even a "Hello wolrd" in there!
2007-04-19 14:23
enthusi

Registered: May 2004
Posts: 675
this one is so much nicer :)

0 poke55,138:poke56,228:clr
1 a$="ibm"
2 b$="macintosh"
3 print a$;"+";b$;"=";a$+b$
2007-04-19 15:11
Mace

Registered: May 2002
Posts: 1799
Hahaha, this one is cool! :)
2007-04-19 19:09
Shadow
Account closed

Registered: Apr 2002
Posts: 355
Yeah, that was an unexpected program behavior. Cool! Now how does it work??
2007-04-19 20:04
AüMTRöN

Registered: Sep 2003
Posts: 44
I'm not completely sure how it works, but $37/38 (highest addr used by basic) is being set to $e48a. If you look at the ROM below $e48a it has the string "COMMODORE 64" (part of the startup text). I also think the length of the string "IBM"+"MACINTOSH" has something to do with it.

Anyone? :)
Previous - 1 | 2 | 3 | 4 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
saimo/RETREAM
Avalanche/Atlantis
JEZ
Hypnosis/TSD
LightSide
rexbeng
Murphy/Exceed
Guests online: 112
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 Uncensored  (9.6)
7 Wonderland XIV  (9.6)
8 Comaland 100%  (9.6)
9 No Bounds  (9.6)
10 Unboxed  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Party Elk 2  (9.6)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 It's More Fun to Com..  (9.5)
7 Morph  (9.5)
8 Dawnfall V1.1  (9.5)
9 Onscreen 5k  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Oxyron  (9.3)
3 Nostalgia  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.2)
Top Graphicians
1 Mirage  (9.7)
2 Archmage  (9.7)
3 Facet  (9.6)
4 Carrion  (9.6)
5 Pal  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.059 sec.