Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site imagen.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!sun!saber!imagen!turner From: turner@imagen.UUCP (D'arc Angel) Newsgroups: net.micro.atari16 Subject: rtxdemo as promised Message-ID: <292@imagen.UUCP> Date: Tue, 4-Mar-86 00:13:30 EST Article-I.D.: imagen.292 Posted: Tue Mar 4 00:13:30 1986 Date-Received: Fri, 7-Mar-86 03:55:19 EST Distribution: net Organization: The Houses of the Holy Lines: 648 ~~~~~~~~~~~~~~~~~~~~~\ lineater, \~~~~~~~~~~~~~~~~~~~~~~~~~~~ here it is rtxdemo.uue (uudecode it to rtxdemo.tos) and a c program to demonstrate how to use mult-tasking, the c program will not compile and is meant as an example only. i wish i had the package program for shar so i could bundle this properly, perhaps some kind soul could point me in the right direction. ========================================================================== begin 664 rtxdemo.tos M8!H #D. *# IW "I/*FT !"/- !#&B M S0 MK0 4T*T '-"\ % "( THW"O/____XN02\ +PU"9S\\ $I.0=_\ #"!Y M !#&B)H !C3Z <(\D $,>1>@ @! : H #_/P O"IW.3KD "-\3OD M "Z(B\ !# \ ,A.0DYU(&\ !" (0>@! +_(9 1P_TYU(\ $,>0H!.=4Y6 M P+P ((B\ "DY"O_D $,>9!0P/ )0?D #IJ(@A.0C \ !.0DY>3G4@ M;P $,B\ "# O I(P%. ;P80P5'(__Q"@$YU(&\ !# O A*$&8$0H!.=; 8 M9O0@"%. 3G5.5O^B3KD ?H0E="ITZY *[EB/T'S_G#U _Z@P+O^H1$ ^ M@$*G3KD KN6(\NO .MY.N0 %$HNO .QE.N0 %$HNO .T%.N0 M%$HNO .WQ.N0 %$HNO .[A.N0 %$HNO .^Q.N0 %$HNO /"E. MN0 %$HNO /&).N0 %$HNO /(%.N0 %$HNO /)A.N0 %$HNO M/*Q.N0 %$HNO /+XO#@:7____L&$ P!8CQ N_[!(@& 6XNO /,$O M#@:7____L&$ N)8CRZ\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__F<0#"X (/_^;^(,+@!___YLVF &/7P " 08 MG PN ##__FT8#"X .?_^;A 0+O_^2(#0?/_0'4#__&!.#&X $ 09D0,+@!A M__YM& PN &;__FX0$"[__DB T'S_J1U __Q@(@PN $'__FT8#"X 1O_^;A 0 M+O_^2(#0?/_)'4#__& "8$I@ F!&(&X ## 0P>X $!(N__Q(@=!!(FX ##* M+JX "$ZY D%!U __ZP?/__9QH,+@!,__YG$@PN &S__F<*#"[____^9@#_ M3B!N PP$,'',( ,+O____YF!'#_8"@,+@ *__YG%"ZN @0+O_^2( _ $ZY M G6E2/2B[__&T$< %@ D) 2I],WP" 3EY.=4Y6__PNC@:7 $"\N PO M+@ (80#\%E"/3EY.=4Y6__PNC@:7 $"\N PO+@ (8090CTY>3G5.5O_R M2.<##$)'*FX ""AN Q@ %:#"X )?_Z9@ !4! <2(!@ $R(&X $"U0__98 MK@ 0$!Q(@& :4XP]? *__)@)#U\ !#_\F /_^9B0]? 0 ! =7?_^9Q9*+O_^ M9Q ,+@ @__YO[ PN '___FSD8 8]? ( !!@ ".#"X ,/_^;1@,+@ Y__YN M$! N__Y(@-!\_] =0/_\8$X,;@ 0 !!F1 PN &'__FT8#"X 9O_^;A 0+O_^ M2(#0?/^I'4#__& B#"X 0?_^;1@,+@!&__YN$! N__Y(@-!\_\D=0/_\8 )@ M.F "8#8@;@ ,,!#![@ 0$B[__$B!T$$B;@ ,,H =7?_^9Q@,+@!,__YG$ PN M &S__F<(2B[__F8 _UX@;@ ,,!#!QS" 4XU*+O_\;00@#6 "0D!*GTS?((!. M7DYU3E8 $CG 00J;@ (8 )2C4H59OH@;@ ,$!!(@!K 4JX #$I 9NX@+@ ( M2I],WR 3EY.=4Y6 !(YP$,*FX ""AN Q@#$H59@1"0& 64HU2C! 52("P M%&?L$!5(@!(42(&004J?3-\P $Y>3G5.5@ 2.X " P0 "M P%)N__Y$P&8$ M< %@ G#_/4#_^D)N__Q@)# N__S!_ *(FX "#1N__[3RA(12('00=!\_] ] M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8$9 2,#!N0 0AY"0$Y>3G5.5@ 2.<# $)'8 8^AV$24D>^? 0;?1*GTS? M (!.7DYU3E8 $CG 0PP+@ (P?P"."I V_P ,<*,"X "!M -"54(M (K M?/____\ "D*M 9"K0 ./KP ($)G+PT&EP !).N0 ,13G5.5@ 2.<#!#XN B^? 0918S M_ ) !"1#/Y !#(@ 0D9"@& P0D P!\#\ C@J0-O\ #'"@@M 686 M,_P "0 0D0S^0 0R( $)&0H!@ B -2I],WR" 3EY.=4Y6__I(YP,,*FX M""AN P^+@ 00D ]0/_Z/4#__& ,A@!%)N__J^;O_Z8Q @3)/),F[_^M') M#! "F;F0D P+O_ZD&[__&-F/KP 3\N__I"0# N__R15R ,0H$R+O_\T($O M "\M 8O#0:7 $DZY WT-_\ #CU __Y"@# N__[1K0 &2F[__F86 M,_P !0 0D0S^0 0R( $)&3G5.5O_Z2.<#'"IN HP+@ (P?P".-"\ M #'"BU __Q^_RZ-80 ["9-8 )2BTH39P8,$P Z9O1*$V<<'6/_^@PN $'_ M^FT,#"X 3__Z;@0J2V $2^L C N Y@ "00E3G5.5O_\3EY.=4Y6 !( MYP<,*FX ""AN Q@)! =2( ^@&$P'@ 0'$B /H!A)AP O@9O!' !8!*^!FP$ MFX$WGS_X# '2I],WP" 3EY.=2!?0H P'UJ "( ")Y !#'D/I 0!#\0@ MO\EB!D[Y K)_ 0^\ !" )3M!*A6<*+KS_____B_P $YU3E;_^B!N @] M:/_R__XNK@ 0,&X %B\(,&X %"\(3KD #@<4(\O #\N__X_/ _3KD #@, M4(].7DYU3E;_^B!N @]:/_R__XNK@ 0,&X %B\(,&X %"\(3KD #@<4(\O M #\N__X_/ ! 3KD #@,4(].7DYU(]\ $-N3D$O.0 0VY.=4Y6__Q"0DJN M AL!D2N A20DJN QL!D2N Q20C N K [@ .+4#__# N C [@ .,BX M#,+N K00=!N__P]0/_\("[__ @" !G D2 3EY.=4Y6__Y(YS\ 0D-"A2XN M @L+@ ,9A@C_( $-R(#R @?P & &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 0$! 0$! 0$! 0$! 0$! 0$! 0$! 0$! 0$! 0$! 0$! 0$! 0$! 0$! 0$ M! 0$! 0$! 0$! 0$! 0$! 0$! 0$! 0$! 0$!#8$! 0$! 0@! 0$! 0$( 0$ M! 0$! %(! 0$! 0$! :&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH:&AH: M&AH:&AH:&AH:&@ M M # end ========================================================================= /************************************************************************/ /* */ /* RRRRRRRRR TTTTTTTTTTTTTTT XXX XXX */ /* RRR RRR TTT XXX XXX */ /* RRR RRR TTT XXX XXX */ /* RRRRRRRRR TTT XXX */ /* RRR RRR TTT XXX XXX */ /* RRR RRR TTT XXX XXX */ /* RRR RRR TTT XXX XXX */ /* */ /* MICRO RTX - Atari ST Multitasking Operating System Kernel */ /* */ /* (c) Copyright 1986 by David Beckemeyer */ /* */ /* */ /* This short demonstaration program demonstates some of the */ /* multitasking capabilities of the Atari ST computer. */ /* */ /* This is a sample of a MICRO RTX multitasking application. */ /* As you can see, MICRO RTX applications can be as simple as you */ /* want. The standard GEMDOS functions operate as usual, with */ /* automatic multitasking. */ /* */ /* This MICRO RTX application is a simple "shell" that shows */ /* how to use the kernel to get automatic multitasking. */ /* */ /* When run, the shell will prompt with a "*". It accepts the */ /* following one letter commands: */ /* */ /* e - execute a program file */ /* h - create background CPU hog */ /* l - list a file on the screen */ /* m - spool a file to the modem (RS-232) */ /* p - spool a file to the printer */ /* s - show processes */ /* x - exit demo program */ /* */ /* The e, l, m, and p commands prompt for a file name. In each */ /* case the complete path of the file (including the extension) */ /* must be given. */ /* */ /* The e command will attept to execute the given program file. */ /* This must not be a GEM program with this demo because the */ /* mouse and screen are not set up for GEM. */ /* */ /* The l, m, and p commands cannot be used concurrently. */ /* This is because the demo uses the Unix style standard I/O */ /* library for opening the files (from GEMLIB) and since this */ /* code from DRI is not reentrant, the sharing of the GEMLIB */ /* code doesn't work. This could be fixed by either re-writing */ /* the standard I/O routines, or by using the GEMDOS style */ /* calls (from osbind.h) Fopen, Fread, etc. We are working on */ /* our improved version of the Unix standard I/O library. */ /* */ /* Keep in mind that standard "fopen", "fclose" calls work */ /* normally for progams that always used them. The problem */ /* only comes about when you are actually sharing the data */ /* & code segments, like this demo does. The sub-processes */ /* created here all share one copy of code from "GEMLIB" made */ /* at link time. When individual programs are run as a */ /* single process, they each have their own copy of GEMLIB */ /* so everything works fine. Got it? */ /* */ /* The h command just soaks up CPU time to demonstrate the */ /* fantastic CPU horsepower of the ST. */ /* */ /* With this MICRO RTX demo, you can run up to three background */ /* processes. This is a configuration limitation only. You */ /* can configure MICRO RTX for however many processes you want. */ /* */ /************************************************************************/ #include #include char filename[64]; main() { char buf[80]; char *p; int i, delta; char c; int modem(), hog(), print(); rtx_install(); delta = p_priority(0L, 0) - 100; p_priority(0L, -delta); printf("MICRO RTX - Atari ST Multitasking Operating System Kernel\n"); printf("(c) Copyright 1986 - David Beckemeyer\n\n"); printf("This program is Free! It is a simple application program\n"); printf("that uses the MICRO RTX multitasking kernel to demonstrate\n"); printf("a few of the multitasking capabilities of the ST.\n\n"); printf("It may be freely distributed, provided all the introductory\n"); printf("messages remain intact. MICRO RTX is available from:\n\n"); printf("\tBeckemeyer Development Tools\n"); printf("\t592 Jean Street #304\n"); printf("\tOakland, CA 94610\n"); printf("\t(415) 658-5318\n\n"); do { getline(buf, "* "); switch (buf[0]) { case 'e': getline(buf, "Exec file: "); Pexec(0, buf, "", ""); break; case 'm': getline(filename, "File: "); p_create(100, 20, modem, 0, 0L); break; case 'h': p_create(100, 20, hog, 0, 0L); break; case 'p': getline(filename, "File: "); p_create(100, 20, print, 0, 0L); break; case 's': printf("Processes:\n----------\n\n"); showpall(); break; case 'l': getline(buf, "File: "); list(buf); break; case '\0': case 'x': break; case '?': printf("e - exec a program (foreground)\n"); printf("h - create background CPU hog\n"); printf("l - dump file to screen (foreground)\n"); printf("m - spool file to RS-232\n"); printf("p - spool file to printer\n"); printf("s - show processes\n"); printf("x - exit\n"); break; default: printf("Unknown command - ? lists commands\n"); break; } } while (buf[0] != 'x'); rtx_remove(); printf("\nBye Byte\n"); } modem() { char c; FILE *fd; if ((fd = fopen(filename, "r")) != 0) { while ((c = fgetc(fd)) != EOF) { Cauxout(c); if (c == '\n') Cauxout('\015'); } fclose(fd); } } list(file) char *file; { char c; FILE *fd; if ((fd = fopen(file, "r")) != 0) { while ((c = fgetc(fd)) != EOF) { putchar(c); } fclose(fd); } else printf("%s does not exist\n", file); } hog() { for (;;) ; } print() { char c; FILE *fd; if ((fd = fopen(filename, "r")) != 0) { while ((c = fgetc(fd)) != EOF) { Cprnout(c); if (c == '\n') Cprnout('\015'); } fclose(fd); } } getline(buf, p) char *buf; char *p; { Cconws(p); buf[0] = 78; Cconrs(buf); buf[2+buf[1]] = '\0'; putchar('\n'); strcpy(buf, buf+2); } -- ---- The master is not yet married, nor do I think he ever will be. -Rocky Horror Picture Show Name: James Turner Mail: Imagen Corp. 2650 San Tomas Expressway, P.O. Box 58101 Santa Clara, CA 95052-8101 AT&T: (408) 986-9400 UUCP: ...{decvax,ucbvax}!decwrl!imagen!turner CompuServe: 76327,1575