| |
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.... |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
AFAIK you can set a new loadadress with the kernal save... |
| |
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.
|
| |
Graham Account closed
Registered: Dec 2002 Posts: 990 |
@cadaver: IDE64 shouldnt use IEC device numbers then. |
Previous - 1 | 2 - Next |