On 05.03.2017 00:53, Harry Potter wrote:
> On Saturday, March 4, 2017 at 3:41:47 PM UTC-5, Harry Potter wrote:
>> On Saturday, March 4, 2017 at 2:59:51 PM UTC-5, Harry Potter wrote:
>>> Uhh...will that work on ML programs loaded and run as BASIC? If so, that
may be all I need. :)
>>
>> It worked! Thank you! :D
>
> One problem: I just tried to copy a file that's too big to fit in memory--I
forgot about that--and got an Out of Memory error. I need another way to copy
this file. :(
>
Hi!
The reason for this is that the file is over 159 blocks long, so Basic
is not able to save the file because name does not fit into memory.
Easy solution for this is a wery small m/l program. I made one, and its
size is just 40 bytes. Only problem is that the name is always same, but
1541 dos allows you to change the name afterwards.
Create a program like this and place it into 679 onwards (I used 53200
on my c64, but i had another program that was trouble if I used 679).
Also tape buffer is not suitable for your program, because you might
want to copy from tape also.
Assembler code:
*=679
lda #1 ;logical address
tay ;set same as secondary
ldx #8 ;devnum (you can change this, if want)
jsr $ffba ;SETLFS routine, kernal
lda #2 ;name length
ldx #name ;name high address
jsr $ffbd ;SETNAM routine, kernal
lda #54 ;turn BASIC off
sta $1 ;store to CPU register
;now we can store the area from 2049 to 53247, but of course we save
;only the data that is needed, not more.
lda #$2b ;we save from Basic start
ldx $2d
ldy $2e ;to Basic end, since Basic load
;has set the variables start (this makes the trouble when trying to
;save something over 159 blocks!)
jsr $ffde ;call Kernal save routine
lda #55
sta $1 ;return Basic interpreter
rts ;return to Basic
name !tx "na" ;name for Kernal
Since the Kernal save routine does not need Basic interpreter, you can
safely turn it off. This routine is also Jiffydos or another turbo
compatible.
Now, the usage:
1. Load this tiny program to memory. After loading, give command NEW or
reset the c64. Dont worry, this software survives even hard reset
(sys64738 or reset switch!).
2. Load the program from the media you want to copy (turbo tape, disk,
whatever). Only thing is that you need to use LOAD command or compatible
way to load it.
3. Put the destination disk to your disk drive and type SYS 679. The
disk drive starts its slow process, and after the process READY prompt
comes to screen. If you need more copies, just repeat SYS 679 with
another disk.
4. Type NEW.
5. Load the disk directory and you will see a program named NA on the disk.
6. Rename the program to whatever you want. For example:
open1,8,15,"r0:gianasisters=na":close1
This program can save also shorter programs than 160 blocks, its maximum
being 201 blocks. Only short is that you have to rename the file
afterwards, but it is only tiny price if you need to copy files.
If your file size is over 201 blocks, you need to use special program
for it.
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|