Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user eightbitswide ! (Registered 2024-12-24) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > load + save = copy ???
2004-05-01 08:13
Rattus
Account closed

Registered: Apr 2004
Posts: 34
load + save = copy ???

Is it possible to make a program that copies files by just using kernal calls ?

Let's say I have a file that has a load address of $0900...
So when you type load "file",8,1 it is loaded to $0900 and is runnable...

But... If you load the file using kernal call LOAD... And want it to load to $4000 it goes nicely there. The problem is here: How to save the file from $4000 so, that it will load to $0900 next time you load it from BASIC ?

Are there routines in kernal to figure out files start-address, end-address, length etc... ?

It would be really nice if someone could bother helping me...
 
... 10 posts hidden. Click here to view all posts....
 
2004-05-04 07:10
Oswald

Registered: Apr 2002
Posts: 5094
AFAIK you can set a new loadadress with the kernal save...
2004-05-04 12:57
Stryyker

Registered: Dec 2001
Posts: 468
You can Oswald? Enlighten me. I know AR had a save file with different load address.

If you are messing with something funky it can be a bit of hassle but search for start track + sector. Use the U1 and U2 command to read to drive buffer, change 2 bytes (B-P first) and write back. Maybe even spend a little time using the open command with certain thingy (I'm getting dumb!), like lda #$03,ldx #$08, ldy #thingy, jsr $ffba then open. See what drive locations are used then close, B-P then write with suitable U command. Check AR loader as this uses similar method to setup the loader. Use kernel open command then start some drive code (unsure if it uses open, then writes to drive memory then executes or what). That atleast happens with 1581 fast loader.

Bad formatting but ideas.

If your code was tidy enough, you could make something a drive mem multiple start address changer. Just dump a queue to drive and use similar filename parsing like some IRQ loaders then return.

2004-05-04 17:06
Graham
Account closed

Registered: Dec 2002
Posts: 990
@cadaver: IDE64 shouldnt use IEC device numbers then.
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
MWR/Visdom
kbs/Pht/Lxt
WVL/Xenon
A3/AFL
CA$H/TRiAD
Chesser/Blazon
DJ Gruby/TRiAD
iAN CooG/HVSC
psych
Guests online: 115
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 X-Mas Demo 2024  (9.5)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 Antitrack  (9.8)
3 OTD  (9.8)
4 Fungus  (9.8)
5 S!R  (9.8)

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