It is currently Wed May 14, 2025 9:31 pm

All times are UTC [ DST ]




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

Joined: Wed Jan 11, 2006 11:22 am
Posts: 874
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 8:20 pm 
Offline
User avatar

Joined: Thu Jan 12, 2006 12: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 10:51 pm 
Offline
Site Admin

Joined: Wed Jan 11, 2006 11:22 am
Posts: 874
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 10:59 pm 
Offline

Joined: Sat Oct 14, 2006 8: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 5:49 pm 
Offline
Site Admin

Joined: Wed Jan 11, 2006 11:22 am
Posts: 874
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 [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


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:  
Powered by phpBB® Forum Software © phpBB Group