It is currently Thu Dec 14, 2017 10:53 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Dec 13, 2007 8:49 pm 
Offline
Site Admin

Joined: Wed Jan 11, 2006 12:22 pm
Posts: 860
I'm trying to find a way to find out what Device number was used to load the current program, or what device was last accessed. I've been looking thru the kernel memory pages ($0000-03ff) but can't find it. I thought I could just read $00ba and get it, but no.


Top
 Profile  
Reply with quote  
PostPosted: Thu Dec 13, 2007 9:20 pm 
Offline
User avatar

Joined: Thu Jan 12, 2006 1:52 am
Posts: 203
Location: Denmark
RaveGuru wrote:
I thought I could just read $00ba and get it, but no.

erhm.. why not? - $ba always holds the last accessed disk device num!?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Dec 13, 2007 11:51 pm 
Offline
Site Admin

Joined: Wed Jan 11, 2006 12:22 pm
Posts: 860
I don't know, I'm currently using cc65 and I'm just reading 3, which is the screen IIRC. It must be the cc65 library that's messing with the devices. I'd want to check $ba before the lib does its things but I don't know if there's any convenient way of doing that other than with a ML Monitor....


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Dec 13, 2007 11:59 pm 
Offline

Joined: Sat Oct 14, 2006 9:30 am
Posts: 140
Use conio.h instead of stdio.h. stdio uses device 3 to print, conio uses direct screen access and is much faster.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Dec 29, 2007 6:49 pm 
Offline
Site Admin

Joined: Wed Jan 11, 2006 12:22 pm
Posts: 860
Ah that explains why I'm reading dev #3. I had problems with conio at an early stage. Perhaps time to give it a go again :)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group