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 > how do i load and run a program from another?
2006-04-11 13:59
Trifox
Account closed

Registered: Mar 2006
Posts: 108
how do i load and run a program from another?

...have made a reader programm for my upcoming 1k game, now i want this reader to load the game and start it !
 
... 10 posts hidden. Click here to view all posts....
 
2006-04-12 06:59
TNT
Account closed

Registered: Oct 2004
Posts: 189
INPUT# doesn't work in direct mode, but you can POKE58,254 before it to work around that.
2006-04-12 08:16
hannenz
Account closed

Registered: Nov 2002
Posts: 24
i tried it and THIS must(!) work: (it works for me in vice with a d64 image attached containig a file called "game", compiling with ACME):

!to "c:/test.prg"
!ct pet

*=$1000

		lda #1
		ldx #8
		ldy #0
		jsr $ffba
		lda #fend-filename
		ldx #<filename
		ldy #>filename
		jsr $ffbd
		lda #0
		jsr $ffd5
		rts
		
filename		!tx "game"
fend

2006-04-14 01:01
Wyndex
Account closed

Registered: Apr 2006
Posts: 1
Hi guys,

If you're using 0 as the secondary address/command (ldy #00 before SETLFS), you need to specify the load address in XY before the call to LOAD:

LDA #08 ;File no.
LDX $BA ;Current device number
LDY #00 ;Secondary address
JSR SETLFS
LDA #0
LDX LOADADDR
LDY LOADADDR+1
JSR LOAD

If you want to use the address stored in the file, use LDY #1 (like load ,x,1).

-Wyn-
2008-07-23 12:06
El Topo

Registered: Jun 2006
Posts: 49
Ok, a related question. I've written a program that loads a couple of SEQ-files to memory. I get it to work when running it from TASM (compile+execute option) but when I do a sys to my program at the basic prompt I get a file not found flashing.

Filenames are stored like this: label .text "filename,s,r"
Correct?

Previous - 1 | 2 - 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
Tom-Cat/Nostalgia
AlexC
rime/Fancy Rats
Hok/Remember
Airwolf/F4CG
REBEL 1/HF
RaveGuru/Booze Design
iceout/Avatar/HF
Guests online: 308
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Wonderland XIV  (9.5)
9 Uncensored  (9.5)
10 Comaland 100%  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Performers  (9.3)
5 Censor Design  (9.3)
Top Fullscreen Graphicians
1 Joe  (9.7)
2 Sulevi  (9.6)
3 The Sarge  (9.6)
4 Veto  (9.5)
5 Facet  (9.5)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.055 sec.