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 > file not found-error.
2003-05-10 11:47
Testicle
Account closed

Registered: Sep 2002
Posts: 131
file not found-error.

hi,

if i use the simple kernal-load-routine ($ffba/$ffbd to init, $ffd5 to load), and the file is not found, where can i check the error-message, so my program also knows, that the file is not found?

thanks for your help...
2003-05-10 13:50
Graham
Account closed

Registered: Dec 2002
Posts: 990
in the case of errors you have to read the 1541s error channel. to do this you can either use complicated open/input/close calls, or just use this:

LDA $BA ; device number
JSR $FFB4 ; TALK
LDA #$6F ; secondary adress 15
JSR $FF96 ; SECTLK
LDY #$00
STY $90 ; clear status flag
l: JSR $FFA5 ; IECIN
STA store,Y
BIT $90 ; test status flag
BVS e ; bit 6 (EOF flag) set?
INY
BNE l
e: JSR $FFAB ; UNTLK

now you'd need to parse the error string somehow. the format is quite simple: "ee, string,tt,ss<CR>"

ee is the error number where 00 is no error and 73 is the disk drive initialisation message (also no error).

you could also read the error string with some open/input/close combination, but it's far more complicated with that. i always avoid those calls.
2003-05-10 18:30
Testicle
Account closed

Registered: Sep 2002
Posts: 131
works very fine! thanks a lot. :-)
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
JEZ
MAT64
Apollyon/ALD
Didi/Laxity
Hoogo/Padua
Krill/Plush
Guests online: 132
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.8)
4 Acidchild  (9.7)
5 Starlight  (9.6)

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