Article View: net.micro.atari16
Article #2655TRAPs from an interrupt handler and micro C Shell
From: braner
Date: Mon, 03 Nov 1986 04:13
Date: Mon, 03 Nov 1986 04:13
31 lines
2031 bytes
2031 bytes
[] Following this posting you will find a posting of source code for a program that compresses ST pictures AND codes them into a text file that can be sent through e-mail. The text file's length depends on the picture, but for simple pictures (e.g. an image of a desktop with some icons and an open dialog box) it is about 4000 to 8000 chars, i.e. 12 to 25% of the bitmap size in RAM. The combination code/compress algorithm is the culprit for those ratios. The program is installed in RAM, and activated later upon an Alt-Help. Then, instead of printing the screen, it codes it and saves it on the disk. (I have also written a program that decodes and decompresses the text file, shows the picture on the screen, and can also save it uncompressed in DEGAS format. I am waiting for net.atari16.sources to post it, and the 2 executables.) To do what it does, the program calls various OS routines (via TRAPs). But, the program is called from the keyboard interrupt handler, and it is officially verboten to do OS calls from there!! I did it anyway, because I didn't know what else to do. And it seems to work - from the desktop. But when called from inside micro-C-Shell, the system hangs. Removing all the TRAPs makes the program docile (but also futile...). Can some expert out there tell us what to do about it, and/or how to write files without TRAPs? - Moshe Braner
Technical Details
Message-ID:
<1357@batcomputer.TN.CORNELL.EDU>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rochester!cornell!batcomputer!branerReferences:
<14600009@uklirb.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rochester!cornell!batcomputer!braner From: braner@batcomputer.TN.CORNELL.EDU (braner) Newsgroups: net.micro.atari16 Subject: TRAPs from an interrupt handler and micro C Shell Message-ID: <1357@batcomputer.TN.CORNELL.EDU> Date: Sun, 2-Nov-86 23:13:21 EST Article-I.D.: batcompu.1357 Posted: Sun Nov 2 23:13:21 1986 Date-Received: Tue, 4-Nov-86 00:27:55 EST References: <14600009@uklirb.UUCP> Reply-To: braner@batcomputer.UUCP (braner) Organization: Theory Center, Cornell University, Ithaca NY Lines: 31 Summary: HELP!!!