🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sources.apple2
1 messages
1 total messages Started by Jonathan A. Chandross Mon, 11 Feb 1991 02:03
v001SRC025: pwd For DOS 3.3
#92
Author: Jonathan A. Chandross
Date: Mon, 11 Feb 1991 02:03
57 lines
1755 bytes
Submitted-by: NONE
Posting-number: Volume 1, Source:25
Archive-name: util/pwd.c
Architecture: ANY_2
Version-number: 1.00

 Print the working directory of AZTEC C on the APPLE
 stdout device.  It should be easy, but since there is no
 system call to do it, we open an absurdly named file for
 read and then go peeking around in DOS to see what drive
 the system tried to read it on.

=pwd.c
-
-/*
- *
- * pwd.c
- *
- * Print the working directory of AZTEC C on the APPLE
- * stdout device.  It should be easy, but since there is no
- * system call to do it, we open an absurdly named file for
- * read and then go peeking around in DOS to see what drive
- * the system tried to read it on.
- *
- * Usage:
- *	pwd
- *
- * John Duncan
- * November 1983
- * Version 1.00
- */
-
-#define DRIVE	0xB7F8
-#define SLOT	0xB7F7
-#define VOL	0xB7F6
-
-char mesg[] = "sX, dX, vXXX\n";
-main()
-{
-	register char ch;
-
-	open( "", 0 );
-	ch = *SLOT;
-	mesg[1] = (ch>>4) + '0';
-	ch = *DRIVE;
-	mesg[5] = ch + '0';
-	ch = *VOL;
-	mesg[11] = ch%10 + '0';
-	ch = ch/10;
-	mesg[10] = ch%10 + '0';
-	mesg[9] = ch/10 + '0';
-	write( 1, mesg, 13 );
-}
-
-
+ END OF ARCHIVE
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads