braner@batcomputer.tn.cornell.edu (braner) (01/11/87)
[] I'm still stuck on the problems I posted a couple of days ago. Consider a program based on the following idea: Rwabs(READ, buffer, secs-1, 1, A); Rwabs(WRITE,buffer, secs-1, 1, D); where secs=no. of sectors on the disk, and READ, WRITE, A and D are the obvious constants. (D is a RAM disk.) This should copy the complete floppy disk contents to the RAM disk. Note that the boot sector (#0) is NOT overwritten. As long as the two disks have the same LOGICAL structure (bytes per sector, sectors per cluster, sectors per FAT and in the root directory) the copied data should be usable. And it is! I have succesfully copied a single sided disk to a double-sided one this way, AS A DISK (not file-by-file). As a matter of fact, I have a nifty program that (after appropriate safety checks...) allows copy from any drive to any drive, all ready to go, but... The Problem: SOMETIMES (not always!), when copying from a floppy to the RAMdisk, I end up with a strange RAMdisk: all files in the root directory work fine, EXCEPT subdirectories (folders). When clicked, it flickers and stutters and ends up still showing the root directory contents. (From inside micro-C-Shell I get "not found" responses to "ls sub_dir_name".) A check with a RAM editor shows that all the relevant data is present in the RAMdisk area where expected. Can anyone pull me out of THIS ditch? - Moshe Braner
braner@batcomputer.UUCP (03/12/87)
[] I know how to intercept the keyboard interrupt handler ($118), but how can I tell what key was pressed? Ideally, I'd like to be able to grab a special key (e.g. Alt-shift-ctrl-Z) and react to it from my own utility, so that TOS will never know it was pressed! Alternatively, I could let the usual handler do it's thing first. But then where do I find the info on what was it? I have in mind the tricks used on IBM-PCs where you press a key and a resident utility pops up (e.g. sidekick), or a resident utility translates the key to a macro (e.g. superkey) or checks your spelling as you type. - Moshe Braner