LnSOS BOOT 1.1 SOS.KERNEL SOS KRNLI/O ERRORFILE 'SOS.KERNEL' NOT FOUND%INVALID KERNEL FILE: xةw,@  ȱlmi8#)!) CONSOLEI /MANDELBROT.TEXT y'y'yt(.FTYPE.ASM.CODEy t,TYPESET.CODEyt9,TYPESET.TEXTyy)UTIL.TEXT002 y"y"(ON.THREE!@3/MANDELPROG.TEXT y y III.PCL.11u' /CONSOLE.IO.CODEyo /CONSOLE.IO.TEXT<yv /NUFOT.MENU.TEXT5?|yv3 /NUFOT.MENU.CODEt(yo .FTYPE.ASM.TEXT y t/MANDELPROG.CODE >dLԡm#i㰼m#iЕOLԡȱfg hi !dLԡ憦  Ljmkm l y`2 Lԡ8(Je稽)ʈ@L :á *ǀ ::á  :Jǀȡ:6ǀ:"ǀ:"he display to its state prior to open_window } procedure close_window; { download_font -- down load the new font, stored in fontbuf, into console } procedure download_font( fontbuf : two_blocks ); {===========================================================================}  implementation X E :ter : string ); { close_window -- restore the display to its state prior to open_window } procedure close_window; { download_font -- down load the new font, stored in fontbuf, into console } procedure download_font( fontbuf : two_blocks ); {==========={ vyouport -- set a viewport on the screen, all coords are absolute } procedure vyouport( top, left, bottom, right : integer ); { open_window -- open a sub window on the screen } procedure open_window( top, left, bottom, right : integer; 7title, foo_viewport; # { clear_eov -- clear the to the end of the current viewport } procedure clear_eov; { clear_eol -- clear the from cursor to the end of the line } procedure clear_eol; ally } procedure horiz_scroll( left_right : integer ); { cursor_movement -- set the cursor movement control value } procedure cursor_movement( ctrl_char : integer );  { clear_viewport -- clear the current viewport and home the cursor } procedure clear ); { r_print -- right justify text within a line } procedure r_print( buff : string ); { curlocat -- set the cursor position within the viewport } procedure curlocat( row, col : integer );  { horiz_scroll -- scroll text within the viewport horizontprocedure print( buff : string ); { println -- send a line of text to the console terminated by a } procedure println( buff : string ); { ctr_print -- print text centered on the current line in the viewport } procedure ctr_print( buff : stringREAD_WRITE = 3; #BW_80_x_24 = 2;  type #max_viewport = packed array [0..1922] of char; #stat_table = packed record 5tbl_size : 0..255; 5tbl_data : packed array [1..90] of char; 4end;   var #ifd : integer; -- send a line of text to the console } R_VIEWPORT = 18; # #{ Console Status Codes } # #SAVE_STATUS = 1; #SAVE_VIEWPORT = 18; # #{ Miscellaneous } # #ECHO_ON = 128; #ECHO_OFF = 0; #et_chr( var key : char ); { wait -- wait a specified number of 1/60 second intervals } procedure wait( tics : integer ); { inverse -- turn on reverse video mode } procedure inverse; { normal -- turn on normal video mode } procedure normal; { print  uses "sosio; " type "two_blocks = packed array [0..1023] of char;  { get_kbd -- read a keystroke from the console without echoing it } procedure get_kbd( var key : char ); { get_chr -- read a keystroke from the console with echo } procedure gتP++š+:T(تP:R تP++ȡ.ǀǀ+:+:TX تP++ȡ,ǀǀ+:+:TV ǀǀؿǀٿ:< ǀáǀ ǀ:F ǀǀؿ:0 ǀ:"ǀ !"#$%&'()*+,-./01231 2 O^jc2#YfsLRETCODE ! :Hj@7'%+9?SAVEDWND6SYSBUF WINDOWHEWINDOWWI`~aWNDOOPEN *CRLF ;CONSTATU."FRdpIFD @80z OUTPUT ,@Yfs}fs #3I\m}#YfsLRETCODE ! :Hj@7'%+9?SAVEDWND6SYSBUF WINDOWHEWINDOWWICONID 4d2CONSOLE CRLF ;CONSTATU."FRdpIFD @80z OUTPUT ,@Yfs}fs #3I\m}   dh:áT:á@ZZZZvب: ת  .CONSOLEת ::ˡO7Error opening the output device, terminating execution.ǀǀǀǀ:Px&rnN*:á* 0   dh:áT:á@ZZZZvب: ת  .CONSOLEת ::ˡO݂ݕ܂ܕš ۶šɡ ڶɡٶšضɡٶضĄ۶ȄڶĄv 0٪PتP:á>:á* 0 :"ǀ:"ɡɡOšOšǀǀǀڿǀۿǀǀǀڕǀە ǀڕە :{============================================================================ #SOS_Catalog_List regular unit # #Author: T. Bartkiewicz # #Date: 02-Jan-88 # #Description: # #The console I/O unit uses SOS I/O to read and write to the console #T = 18; # #{ Console Status Codes } # #SAVE_STATUS = 1; #SAVE_VIEWPORT = 18; # #{ Miscellaneous } # #ECHO_ON = 128; #ECHO_OFF = 0; #READ_WRITE = 3; #BW_80_x_24 = 2;  type # 24; #ABS_POSITION = 26; #CLR_VIEWPORT = 28; #CLR_EOV = 29; #CLR_EOL = 31; # #{ Console Control Codes } # #RSTR_STATUS = 1; #SCREEN_ECHO = 11; #CC_CHARSET = 16; #RSTR_VIEWPOR#SCREEN_OFF = 14; #SCREEN_ON = 15; #TEXT_MODE = 16; #NORMAL_MODE = 17; #INVERSE_MODE = 18; #CURSOR_CONTROL = 21; #SYNC_SCREEN = 22; #HORIZONTAL_SHIFT = 23; #SET_HORIZ_POS ==========================================================}  implementation  const #{ Console Screen Control Codes } # #RESET_VIEWPORT = 1; #TOP_VIEWPORT = 2; #BOTTOM_VIEWPORT = 3; #RESTORE_VIEWPORT = 4; tring ); { close_window -- restore the display to its state prior to open_window } procedure close_window; { download_font -- down load the new font, stored in fontbuf, into console } procedure download_font( fontbuf : two_blocks ); {==================are absolute. #Here is first reference to CMD's modification. } procedure vyouport( top, left, bottom, right : integer ); { open_window -- open a sub window on the screen } procedure open_window( top, left, bottom, right : integer; 7title, footer : sprocedure clear_viewport; # { clear_eov -- clear the to the end of the current viewport } procedure clear_eov; { clear_eol -- clear the from cursor to the end of the line } procedure clear_eol; { vyouport -- set a viewport on the screen, all coords port horizontally } procedure horiz_scroll( left_right : integer ); { cursor_movement -- set the cursor movement control value } procedure cursor_movement( ctrl_char : integer );  { clear_viewport -- clear the current viewport and home the cursor } buff : string ); { r_print -- right justify text within a line } procedure r_print( buff : string ); { curlocat -- set the cursor position within the viewport } procedure curlocat( row, col : integer );  { horiz_scroll -- scroll text within the viewhe console } procedure print( buff : string ); { println -- send a line of text to the console terminated by a } procedure println( buff : string ); { ctr_print -- print text centered on the current line in the viewport } procedure ctr_print( { wait -- wait a specified number of 1/60 second intervals } procedure wait( tics : integer ); { inverse -- turn on reverse video mode } procedure inverse; { normal -- turn on normal video mode } procedure normal; { print -- send a line of text to tray [0..1023] of char;  { get_kbd -- read a keystroke from the console without echoing it } procedure get_kbd( var key : char ); { get_chr -- read a keystroke from the console with echo } procedure get_chr( var key : char ); io is here changed to "vyouport" to avoid conflict with procedure "viewport" in unit PGRAF.   ============================================================================}  unit console_io; interface  uses "sosio; " type "two_blocks = packed ardevice. A rudimentary windowing system is implmented which uses #pop up/exploding windows.  ------------------------------------------- Modified by C.M. Davidson 20 March 1992 to permit graphics display from the menu. Procedure "viewport" in console.max_viewport = packed array [0..1922] of char; #stat_table = packed record 5tbl_size : 0..255; 5tbl_data : packed array [1..90] of char; 4end;   var #ifd : integer; { Console file descriptor } #retcode : integer; { Function return code } #sysbuf : integer; { SOS system buffer } #window_height : integer; { Internal vars to keep } #window_width : integer; ht justify text within a line } #procedure r_print{( buff : string )}; # #var %len : integer; % #begin &len := length( buff ); &if (len <= window_width) then )begin ,output[1] := chr( SET_HORIZ_POS ); ,output[2] := chr( window_width - len ); ,s; &if (len <= window_width) then )begin ) output[1] := chr( SET_HORIZ_POS ); ,output[2] := chr( (window_width - len) div 2 ); ,sos_write( ifd, output, 2, retcode ); )end; &sos_s_write( ifd, buff, 1, len, retcode ); #end; # # #{ r_print -- rig&print( buff ); &sos_s_write( ifd, crlf, 1, 2, retcode ); #end; # # #{ ctr_print -- print text centered on the current line in the viewport } #procedure ctr_print{( buff : string )}; # #var &len : integer; # #begin # len := length( buff )nteger; # #begin &len := length( buff ); &if (len > 0) then )sos_s_write( ifd, buff, 1, len, retcode ); #end; # # #{ println -- send a line of text to the console terminated by a } #procedure println{( buff : string )}; # #begin turn on normal video mode } #procedure normal; # #begin &output[1] := chr( NORMAL_MODE ); &sos_write( ifd, output, 1, retcode ); #end; # # #{ print -- send a line of text to the console } #procedure print{( buff : string )}; # #var &len : icnt := 1 to tics do 'sos_write( ifd, output, 1, retcode ) #end; # # #{ inverse -- turn on reverse video mode } #procedure inverse; # #begin # output[1] := chr( INVERSE_MODE ); &sos_write( ifd, output, 1, retcode ); #end; # # #{ normal -- &sos_d_control( con_id, SCREEN_ECHO, cntrl_list, retcode ); #end; # # #{ wait -- wait a specified number of 1/60 second intervals } #procedure wait{( tics : integer )}; # #var %icnt : integer; % #begin %output[1] := chr( SYNC_SCREEN ); %for i# #begin &cntrl_list := ECHO_ON; &sos_d_control( con_id, SCREEN_ECHO, cntrl_list, retcode ); &sos_read( ifd, inbuf, 1, bytes_read, retcode ); &if bytes_read = 1 then )key := inbuf[0] &else )key := chr( 0 ); &cntrl_list := ECHO_OFF; #procedure get_chr{( var key : char )}; # #var &bytes_read : integer; { # bytes actually read } &inbuf : packed array [0..1] of char; { input buffer } &cntrl_list : integer; { single word list }  chr( 0 ); #end; # # #{ get_chr -- read a keystroke from the console with echo. Note Apple /// } #{ Pascal does its own echoing, so we must turn console driver } #{ echoing on before getting the key stroke then turn it off } &bytes_read : integer; { # bytes actually read } &inbuf : packed array [0..1] of char; { input buffer } # #begin &sos_read( ifd, inbuf, 1, bytes_read, retcode ); &if bytes_read = 1 then )key := inbuf[0] &else )key := : stat_table; { Console status table } " " #{ get_kbd -- read a keystroke from the console without echoing it } #procedure get_kbd{( var key : char )}; # #var ame string } #output : packed array [1..128] of char; { Internal text buffer } #saved_wndo : max_viewport; { Contains window data } #wndo_open : boolean; { True if window is open } #con_status { track of window size } #con_id : integer; { Console device ID } #cr_lf : string[2]; { Carriage_Return-Line_Feed } #console : string[10]; { console nos_write( ifd, output, 2, retcode ); )end; &sos_s_write( ifd, buff, 1, len, retcode ); #end; # % #{ curlocat -- set the cursor position within the viewport } #procedure curlocat{( row, col : integer )}; # #begin &output[1] := chr( ABS_POSITION ); &output[2] := chr( col ); &output[3] := chr( row ); &sos_write( ifd, output, 3, retcode ); #end; # #{ horiz_scroll -- scroll text within the viewport horizontally } #procedure horiz_scroll{( left_right : integer_window; # #begin &if wndo_open then )begin ,sos_d_control( con_id, RSTR_STATUS, con_status, retcode ); ,if retcode = 0 then /begin 2sos_d_control( con_id, RSTR_VIEWPORT, saved_wndo, retcode ); 2if retcode = 0 then 5begin 8{ we must reset the wierse; 2clear_viewport; 2curlocat( 0, 0 ); 2ctr_print( title ); 2curlocat( window_height, 0 ); 2ctr_print( footer ); 2explode_window; /end; )end; #end; #{ close_window -- restore the display to its state prior to open_window } #procedure close&sos_d_status( con_id, SAVE_STATUS, con_status, retcode ); &if retcode = 0 then )begin ,sos_d_status( con_id, SAVE_VIEWPORT, saved_wndo, retcode ); ,if retcode = 0 then /begin 2wndo_open := true; 2vyouport( top-1, left-1, bottom+1, right+1 ); 2inv,if t > top then /t := t - 1; ,if b < bottom then /b := b + 1; ,vyouport( t, l, b, r ); ,wait( 1 ); ,clear_viewport; )until ((t <= top) and (b >= bottom) and (l <= left) and (r >= right)); &end; & #begin )l := left + diff_w; )r := right - diff_w; )t := top + diff_h; )b := bottom - diff_h; )normal; )repeat ,if l-1 > left then /l := l - 2 ,else if l > left then /l := l - 1; ,if r+1 < right then /r := r + 2 ,else if r < right then /r := r + 1; ooter : string }; # # &{ explode_window -- make window openig look exciting (yawn) } &procedure explode_window; & &var )l, r, t, b : integer; )diff_w, diff_h : integer; ) &begin )diff_w := (right - left) div 2; )diff_h := (bottom - top) div 2;&window_width := (right - left) + 1; &window_height := (bottom - top) + 1; &sos_write( ifd, output, 9, retcode ) #end; # $ #{ open_window -- open a sub window on the screen } #procedure open_window{( top, left, bottom, right : integer; ;title, f&output[3] := chr( left ); &output[4] := chr( top ); &output[5] := chr( TOP_VIEWPORT ); &output[6] := chr( ABS_POSITION ); &output[7] := chr( right - left ); &output[8] := chr( bottom - top ); &output[9] := chr( BOTTOM_VIEWPORT ); 0; &if top < 0 then )top := 0; &if right > 79 then )right := 79; &if bottom > 23 then )bottom := 23; &{ set the viewport and calculate its height and width for internal use } &output[1] := chr( RESET_VIEWPORT ); &output[2] := chr( ABS_POSITION ); d; # # #{ vyouport -- set a viewport on the screen, all coords are absolute } #procedure vyouport{( top, left, bottom, right : integer )}; # #begin &{ validate the parameters to make sure they fall in physical space } &if left < 0 then )left := %output[1] := chr( CLR_EOV ); %sos_write( ifd, output, 1, retcode ) #end; # # #{ clear_eol -- clear the from cursor to the end of the line } #procedure clear_eol; # #begin %output[1] := chr( CLR_EOL ); %sos_write( ifd, output, 1, retcode ) #ensor } #procedure clear_viewport; # #begin %output[1] := chr( CLR_VIEWPORT ); %sos_write( ifd, output, 1, retcode ) #end; # # #{ clear_eov -- clear the to the end of the current viewport } #procedure clear_eov; # #begin } #procedure cursor_movement{( ctrl_char : integer)}; # #begin &output[1] := chr( CURSOR_CONTROL ); &output[2] := chr( ctrl_char ); &sos_write( ifd, output, 2, retcode ); #end; # # #{ clear_viewport -- clear the current viewport and home the cur )}; # #begin %output[1] := chr( HORIZONTAL_SHIFT ); %if (left_right = -1) then 'output[2] := chr( 255 ) %else 'output[2] := chr( 1 ); %sos_write( ifd, output, 2, retcode ) #end; # # #{ cursor_movement -- set the cursor movement control value ndow_width and _height for } 8{ use by ctr_print, etc. The previous window } 8{ parameters can be found in the con_status } 8{ buffer at the indicated locations. This may be } 8{ specific to .console v1.3 only, be forewarned! } 8window_width := (ord( con_status.tbl_data[25] ) - ;ord( con_status.tbl_data[24] )) + 1; 8window_height := (ord( con_status.tbl_data[27] ) - ;ord( con_status.tbl_data[26] )) + 1; 5 wndo_open := false; 5end; /end; )end; #end; # # #{ download_{============================================================================ #Menu Maker - Pascal Version # #Author: Tom Bartkiewicz # #Date: 21-Oct-87 # #This is a Pascal version of the Washington Apple Pi Menu Maker program. #The original ve46789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrB E t.O^jcot#wndo_open := false; end. ogram ) #end; #output[1] := chr( TEXT_MODE ); #output[2] := chr( BW_80_x_24 ); #output[3] := chr( RESET_VIEWPORT ); #output[4] := chr( SCREEN_ON ); #sos_write( ifd, output, 4, retcode ); #window_height := 24; #window_width := 80; := chr(10); #console := '.CONSOLE'; #sos_get_d_num( console, con_id, retcode ); #sos_open( console, READ_WRITE, 0, sysbuf, ifd, retcode ); #if (retcode <> 0) then begin &writeln( 'Error opening the output device, terminating execution.' ); &exit( prfont -- down load the new font, stored in fontbuf, into console } #procedure download_font{( fontbuf : two_blocks )}; # #begin &sos_d_control( con_id, CC_CHARSET, fontbuf, retcode ); #end; " # begin #cr_lf := ' '; #cr_lf[1] := chr(13); #cr_lf[2]rsion was written in Business Basic. # #The Pascal Menu Maker supports the following function: # &Execution of Pascal programs &Loading of Font files &Display of the following types of text files: )PascalTEXT )ASCII )/// EZ-Pieces Word Processing &Setting and switching disk volumes &Machine/Memory Status  -------------------------------------------------- Modified by C.M. Davidson, 20 Mar.1992, to display graphics files (Basic FOTO files, File Type #8). A new procedure, do_foto, is added, whi)sos_d_info( i, dev_name, dev_list, retcode ); )if (retcode = 0) and (dev_list[2] > chr(127)) then ,begin /num_blk_devs := num_blk_devs + 1; /blk_devs[num_blk_devs] := dev_name; ,end; &end; end;   { get_date_time -- get system date and time } p; #for i := 1 to MAX_DEVICES do &begin ){ search all possible device entries for a valid block device } ){ block devices are found when the 2nd character in the device } ){ list returns a value greater than 127 (msb is 1 for blk devs } driver } # var #i : integer; { loop counter } #dev_name : string; { device name string } #dev_list : packed array [0..10] of char; { returned device attributes } # begin #num_blk_devs := 0y = chr(ESCAPE_KEY)) then &quit_now := TRUE #else &quit_now := FALSE; end;  { get_blk_devices -- obtain a list of all the block devices installed } procedure get_blk_devices; const #MAX_DEVICES = 24; { maximum number of devices in sos.#until (key = chr(ESCAPE_KEY)); end; { quit_now -- wait until the user says continue or quit } function quit_now : boolean; var #key : char; # begin #repeat &get_kbd( key ); #until (key = chr(ESCAPE_KEY)) or (key = chr(RETURN_KEY)); #if (kery } #file_type : filekind; { file types to look for in directory } " " { get_escape -- wait forever until the user presses } procedure get_escape; var #key : char; # begin #repeat &get_kbd( key ); ices in sos.driver } #prefix : string; { Current SOS prefix } #sys_date : date_string; { System date } #blk_devs : array [1..MAX_BLK_DEVS] of string; #file_list : files; { list of files in a directo#file_idx : integer; { Pointer to file in list } #pages_in_use : integer; { Memory pages in use } #total_pages : integer; { Total pages available in machine } #num_blk_devs : integer; { # of block dev#DOWN_ARROW = 10; #RIGHT_ARROW = 21;   type #date_string = string[18]; "  var #len : integer; #retcode : integer; { SOS Return status codes } #file_cnt : integer; { # of files in a directory } os_catalog_list; " " const " BLANK = ' '; #READ_ONLY = 1; #ON_VALUE = 255; #OFF_VALUE = 0; #MAX_BLK_DEVS = 12; #ESCAPE_KEY = 27; #RETURN_KEY = 13; #LEFT_ARROW = 8; #UP_ARROW = 11; n, Ont., Canada, 22 March 1992.  =============================================================================}  program menu_maker; uses #pgraf, #hexstuff, #chainstuff, #sosio, #{$USING cunsole.io.code } console_io, #{$USING list.cat.code } sport" with "vyouport", and to make the same change in the appropriate references to "viewport" in the main text file. The modified cOnsole.io is renamed "cUnsole.io". No change is needed in the other "USING" file, LIST.CAT.CODE. C.M. Davidson Burlingtoin unit console.io shares its name with the procedure "viewport" in the Pgraf unit, leading the program to compile grumblingly, and to omit the inverse menu border when running. The way around this was to edit the console.io file to replace the word "viewch displays the Fotofile on whose catalog entry the cursor rests until is pressed, at which point the program returns to the menu. A difficulty to be overcome when doing this is that the procedure "viewport" rocedure get_date_time( var pretty_date : date_string ); var #time_buf : date_string; # # #{ make_pretty_date -- format system date/time notation to decent form } #procedure make_pretty_date( oldf : date_string; var newf : date_string ); # #const &MONTHS = '???JanFebMarAprMayJunJulAugSepOctNovDec'; & #var &idx : integer; &ascii_0 : integer; & #begin &newf := BLANK; &ascii_0 := ord( '0' ); &idx := ((ord(oldf[5]) - ascii_0) * 10) + (ord(oldf[6]) - ascii_0); &newf := concat( copy( oldf, 7, procedure list_files( var file_list : files_rec ); const #BLANKS = ' '; { 16 blanks }   var #filler : string; { empty space } #strg : string; { temporary } #  begin #with file_list do &begin ges + user_pages; #print_k( total_pages, 1 ); #print_k( pages_in_use, 2 ); #print_k( sys_pages, 3 ); #print_k( interp_pages, 4 ); #print_k( user_pages, 5 ); #get_escape; #close_window; end; " { list_files -- print the files on the console } f fiveints.retcode = 0 then ,with fiveints do /if segid <= 15 then 2sys_pages := sys_pages + pages /else if segid <= 31 then 2interp_pages := interp_pages + pages /else 2user_pages := user_pages + pages &end; #pages_in_use := sys_pages + interp_pa ' Interp : ' ); #println( ' User : ' ); #total_pages := (peek( 6401, 0 ) + 2) * 128; #pages_in_use := 0; #sys_pages := 0; #interp_pages := 0; #user_pages := 0; #for seg_num := 1 to 31 do &begin )sos_g_seg_info( seg_num, fiveints ); )i&cvt_page_to_k( pages, mem ); &print( mem ); #end; . begin #open_window( 5, 50, 11, 72, 'Memory Map', ' to continue' ); #curlocat( 1, 0 ); #println( ' Total Ram : ' ); #println( ' In Use : ' ); #println( ' SOS : ' ); #println( #seg_num : integer; #fiveints : mem_rec; # # #{ print_k -- print the memory size on the designated line } #procedure print_k( pages, line_num : integer ); # #var &mem : string; & #begin &curlocat( line_num, 14 ); es : integer; { pages allocated to interpreter } #user_pages : integer; { pages allocated to user program } #pages_in_use : integer; { total pages in use } #total_pages : integer; { system memory size }; { last page number } /pages : integer; { number of pages } /segid : integer; { SOS segment id } /retcode : integer; { SOS return code } -end; " var #sys_pages : integer; { pages allocated to SOS } #interp_pag&2 : mem := concat( mem, '.50K' ); &3 : mem := concat( mem, '.75K' ) #end end; $ $ { memory_map -- report allocated sos segments } procedure memory_map; type #mem_rec = packed record /base : integer; { 1st page number } /limit : integer:= 1; #while (mem[i] = '0') and (i <= 2) do &begin )mem[i] := BLANK; )i := i + 1 &end; " #{ load in the decimal portion } # #case remain_k of &0 : mem := concat( mem, '.00K' ); &1 : mem := concat( mem, '.25K' ); ory count } # #for i := 1 to 3 do &begin )mem[i] := chr( (whole_k div poweroften) + ord( '0' ) ); )whole_k := whole_k - ((whole_k div poweroften) * poweroften); )poweroften := poweroften div 10 &end; " #{ replace leading '0's with ' 's } # #i { decimal portion of memory } #poweroften : integer; { mask into the whole_k variable } " begin #mem := ' '; #whole_k := num_pages div 4; #remain_k := num_pages mod 4; #poweroften := 100; # #{ convert the integer portion of the mem{ Convert 256 byte pages to Decimal K } procedure cvt_page_to_k( num_pages : integer; var mem : string ); var #i : integer; { counter } #whole_k : integer; { integer value of memory } #remain_k : integer; 2 ), '-', copy( MONTHS, 3*idx+1, 3 ), 6 '-', copy( oldf, 3, 2 ), ' ', copy( oldf, 10, 2 ), 7':', copy( oldf, 12, 2 ) ) #end;  begin #sos_get_time( time_buf ); #make_pretty_date( time_buf, pretty_date ); end; " )filler := copy( blanks, 1, length(blanks)-length(name) ); )print( concat( name, filler ) ); ){ str( size, strg ); ) filler := copy( blanks, 1, 5-length(strg) ); ) print( concat( filler, strg ) ); } )case f_type of ,CODE_TYPE : print( ' Code ' ); ,TEXT_TYPE : print( ' Text ' ); ,ASCI_TYPE : print( ' Ascii ' ); ,FONT_TYPE : print( ' Font ' ); ,CAT_TYPE : print( ' Catalog ' ); ,EZWP_TYPE : print( ' 3EZP WP ' ); ,FOTO_TYPE : print( ' Foto ' ); ,otherwise print( ' ???? #i : integer; { loop counter } #key : char; { User's key stroke } #num_vols : integer; { Number of on-line volumes } #old : integer; electing a new active volume } function do_vol_list( var new_prefix : string ) : boolean; var #tb : integer; { total blocks on a volume } #fb : integer; { free space on a volume } is information' ) ); #println( ' ' ); #ctr_print( 'Program written by Tom Bartkiewicz' ); #get_escape; #close_window; end; { do_vol_list -- present a list of all the volumes currently on line. The } { user may change the prefix by shic.' ); #print( '-----------------------------------------------' ); #println( concat( oa_char, 'S displays system memory map' ) ); #println( concat( oa_char, 'V displays, selects available block devices' ) ); #println( concat( oa_char, '? displays th#println( ' Catalog : Sets the prefix to the directory.' ); #println( ' Ascii : Displays the file.' ); #println( ' Text : Displays the file.' ); #println( ' 3EZP WP : Formats and displays the file.' ); #println( ' Foto : Displays the Graps to select it.' ); #println( ' ' ); #println( ' Action taken depends on selected file''s type.' ); #println( ' Code : Runs the selected program.' ); #println( ' Font : Downloads the font to the console.' ); _window( 3, 17, 20, 63, 'Menu Maker v1.0 Help Screen', 0'Press to continue...' ); #curlocat( 0, 0 ); #get_date_time( today ); #r_print( today ); #curlocat( 2, 0 ); #println( ' Use the arrow keys to highlight a file' ); #println( ' and pres&println( 'Error synchronizing Pascal-SOS prefix' ); end; { do_help -- give the user the low down on this program } procedure do_help; var #today : date_string; #oa_char : string[2]; # begin #oa_char := ' '; #oa_char[2] := chr( 127 ); #open#get_prefix( current_prefix ); # #{ remove trailing / from prefix } #s_len := length( current_prefix ); #if (current_prefix[s_len] = '/') then &delete( current_prefix, s_len, 1 ); #sos_set_prefix( current_prefix, retcode ); #if (retcode <> 0) then ort( ulr, ulc, lrr, lrc ); )clear_viewport; )wait( 1 ); &end; #curlocat( 0, 0 ); end; { synch_prefix -- set the sos prefix equivalent to the pascal prefix } procedure synch_prefix( var current_prefix : string ); var #s_len : integer; begin d.' ); #wait( 60 ); #normal; #ulr := 11; #ulc := 37; #lrr := 12; #lrc := 42; #vyouport( ulr, ulc, lrr, lrc ); #clear_viewport; #wait( 1 ); #for i := 1 to 5 do &begin )ulr := ulr - 2; )lrr := lrr + 2; )ulc := ulc - 7; )lrc := lrc + 7; )vyoup"  begin #vyouport( 0, 0, 23, 79 ); #inverse; #clear_viewport; #ctr_print( 'WAP /// Pascal Menu Maker' ); #curlocat( 23, 0 ); #ctr_print( 'Press for HELP; to exit' ); #curlocat( 12, 0 ); #ctr_print( 'Washington Apple Pi, Lt#ulc : integer; { upper left corner column } #lrr : integer; { lower right corner row } #lrc : integer; { lower right corner column viewport corners } " i : integer; { index loop counter }  ' ); )end; &end; end; " "  { draw_main_screen -- display the fixed portion of the display; leaves 7viewport set at 1,2 - 22,77 } procedure draw_main_screen; var " ulr : integer; { upper left corner row } { Temporary variable } #vol_name : packed array [1..max_blk_devs] of string[16]; { the volumes name } #on_line : packed array [1..max_blk_devs] of boolean; # begin #do_vol_list := false; #num_vols := 0; #new_prefix := prefix; #open_window( 3, 10, 4+num_blk_devs, 70, 'Volumes On-Line', &'Press to select a new volume, to exit.' ); #curlocat( 0, 0 ); #for i := 1 to num_blk_devs do # begin )sos_volume( blk_devs[i], vol_name[num_vols+1], tb, fb, retcode ); )if retcode = 0 then)inverse; )println( 'Error in directory processing' ); )normal; &end # #{ if this is a subdirectory, provide the means to move towards the } #{ root directory via this subdirectories parent } # #else if is_subdir( prefix ) then &begin )file_cntial_prefix ); #clear_viewport; #curlocat( 1, 0 ); #ctr_print( prefix ); # #{ get the file names and check for errors on return } # #list_catalog( file_type, prefix, file_list, file_cnt, retcode ); #if retcode <> 0 then &begin )println( ' ' ); /) } &if pos( '/', test_prefix ) = 0 then )is_subdir := false &else )is_subdir := true; #end;  begin #retcode := 0; #file_cnt := 0; #if (partial_prefix = PARENT_NAME) then &pop_catalog #else if (partial_prefix <> BLANK) then &push_catalog( parintln( 'Error setting new prefix' ); #end; # # #{ is_subdir -- determine if a prefix is a directory or subdirectory } #function is_subdir( test_prefix : string ) : boolean; # #begin &delete( test_prefix, 1, 1 ); { remove 1st char (always . or #{ push_catalog -- add a subdirectory to the current directory tree } #procedure push_catalog( partial_prefix : string ); # #begin &prefix := concat( prefix, '/', partial_prefix ); &if (set_prefix( prefix )) then )synch_prefix( prefix ) &else )pri] = '/') then ,found := true )else ,i := i - 1; &delete( prefix, i, (length(prefix) - i) + 1 ); &if (set_prefix( prefix )) then )synch_prefix( prefix ) &else )println( 'Error setting new prefix' ); #end; # # parent } #procedure pop_catalog; # #var &i : integer; { counting variable } &found : boolean; { true when last / has been found } & #begin &found := false; &i := length( prefix ); &while (i > 0) and (not found) do )if (prefix[ display the files name, size, and type in 0 the window } procedure do_catalog( partial_prefix : string ); const #PARENT_NAME = '< ..Parent.. >'; # var #i : integer; { loop counter }   #{ pop_catalog -- set the prefix to this catalogs#println( ' Press to exit Menu Maker ' ); #print( ' Press to return to the menu' ); #confirm_quit := (not quit_now); #close_window; end; { do_catalog -- set the new prefix and obtain all files of interest in the 0 directory thenTURN_KEY)) or (key = chr(ESCAPE_KEY))) &end; #close_window; end; { confirm_quit -- make sure that the user really wants to leave menu.maker } function confirm_quit : boolean; begin #open_window( 19, 19, 20, 57, 'Exit MENU MAKER?', ' ' ); ) = RETURN_KEY then /begin 2new_prefix := vol_name[i]; 2do_vol_list := true /end; ,if i <> old then /begin 2curlocat( old, 17 ); 2print( vol_name[old] ); 2curlocat( i, 17 ); 2inverse; 2print( vol_name[i] ); 2normal /end )until ((key = chr(REd := i; ,get_kbd( key ); ,if ord( key ) = DOWN_ARROW then { down arrow } /if i = num_vols then 2i := 1 /else 2i := i + 1 ,else if ord( key ) = UP_ARROW then { up arror } /if i = 1 then 2i := num_vols /else 2i := i - 1 ,else if ord( key#for i := 1 to num_blk_devs do &if (on_line[i] = false) then )println( concat( ' ', blk_devs[i], ' is off-line.' )); #if num_vols > 0 then &begin )i := 1; )curlocat( i, 17 ); )inverse; )print( vol_name[i] ); )normal; )repeat ,ol ,begin /on_line[i] := true; /num_vols := num_vols + 1; /insert( '/', vol_name[num_vols], 1 ); /curlocat( num_vols, 17 ); /print( vol_name[num_vols] ); /println( concat( ' in drive ', blk_devs[i] )) ,end )else ,on_line[i] := false &end; t := file_cnt + 1; )with file_list[file_cnt] do ,begin /name := PARENT_NAME; /f_type := CAT_TYPE; /size := 0; ,end &end; & #{ display the list of files of the selected type(s) in this directory } # #for i := 1 to file_cnt do &begin )if (odd( i mod 2 )) then ,curlocat( 3+(i div 2), 4 ) )else ,curlocat( 2+(i div 2), 44 ); )list_file( file_list[i] ); &end; end;  { do_menu -- allow the user to select a file or option to be acted upon } function do_menu( var file_idx : integer ) : boolean;#sos_open( ascii_file, READ_ONLY, 0, sysbuf, ifd, retcode ); #sos_newline( ifd, ON_VALUE, chr( RETURN_KEY ), retcode ); #cursor_movement( CM_ADVANCE ); #in_buff := ' '; #cur_line := 0; #user_quits := FALSE; #sos_s_read( ifd, in_buff, 1, w_width, byt( 1, 0, 23, 79 ); { set full screen width for text display } #open_window( WT, WL, WB, WR, concat( 'Listing ASCII File: ', ascii_file ), 0'Press for next page; to quit.' ); : integer; { window height } #cur_line : integer; { current line in the window } #user_quits : boolean; { true if user wants to exit early }  begin #w_width := (WR - WL) + 1; #w_height := (WB - WT) + 1; #vyouportad : integer; { number of bytes read from ascii file } #sysbuf : char; { sos i/o buffer; not used } #in_buff : string; { input buffer for reads } #w_width : integer; { window width } #w_height #CM_WRAP = 4; #CM_SCROLL = 8; #WT = 2; { window corner coordinates } #WL = 0; #WB = 22; #WR = 79; #  var #ifd : integer; { ascii file; internal file descriptor } #bytesreprog_name ); #exit( program ); end; { do_asci -- display the selected ascii text file in the window } procedure do_asci( ascii_file : string ); const #CM_ADVANCE = 1; { .console cursor movement constants } #CM_LINEFEED = 2; int( concat( 'Running program: ', prog_name ) ); #vyouport( 0, 0, 23, 79 ); #curlocat( 6, 0 ); #inverse; #clear_eol; #ctr_print( 'When program finishes, enter X to restart MENU.MAKER' ); #normal; #curlocat( 7, 0 ); #clear_eov; #setchain( )end; #until ((key = chr(RETURN_KEY)) or (key = chr(ESCAPE_KEY))); #do_menu := do_item; end; { do_exec -- run the selected pascal program } procedure do_exec( prog_name : string ); begin #curlocat( 2, 0 ); #clear_eov; #curlocat( 3, 0 ); #ctr_pr>list_file( file_list[file_idx] ); >normal ;end; &end; &if (temp <> file_idx) then )begin ,move_to_item( file_idx ); ,list_file( file_list[file_idx] ); ,move_to_item( temp ); ,inverse; ,list_file( file_list[temp] ); ,normal; ,file_idx := temp;_prefix )) then { oa-v or oa-V } ;begin >prefix := new_prefix; >if (set_prefix( prefix )) then Abegin Dsynch_prefix( prefix ); Ddo_catalog( BLANK ) Aend; >file_idx := 1; >temp := file_idx; >move_to_item( file_idx ); >inverse; ESCAPE_KEY : if confirm_quit then ;do_item := false 8else ;key := chr(0); ( 175, 191 : do_help; { oa-/ or oa-? } )211, 243 : memory_map; { oa-s or oa-S } )214, 246 : if (do_vol_list( newle_cnt-1) then ;temp := temp + 2 8else ;temp := 1; )UP_ARROW : if (temp > 2) then ;temp := temp - 2 8else ;temp := file_cnt; )RETURN_KEY : do_item := true; )RIGHT_ARROW : if ((odd( temp )) and (temp < file_cnt)) then ;temp := temp + 1; )#end; # begin #temp := file_idx; #move_to_item( temp ); #inverse; #list_file( file_list[temp] ); #normal; #repeat &get_kbd( key ); &case (ord( key )) of )LEFT_ARROW : if (not odd( temp )) then ;temp := temp - 1; )DOWN_ARROW : if (temp < fi var #key : char; #temp : integer; #do_item : boolean; #new_prefix : string;  #procedure move_to_item( i : integer );  #begin &if (odd( i mod 2 )) then )curlocat( 3+(i div 2), 4 ) &else )curlocat( 2+(i div 2), 44 ); esread, retcode ); #while ((retcode = 0) and (not user_quits)) do &begin ){$RANGECHECK-} )in_buff[0] := chr( bytesread ); ){$RANGECHECK+} )cur_line := cur_line + 1; )if (cur_line > w_height) then ,begin /cur_line := 1; /user_quits := quit_now; /clear_viewport; ,end; )println( in_buff ); )sos_s_read( ifd, in_buff, 1, w_width, bytesread, retcode ); &end; #cursor_movement( CM_ADVANCE + CM_WRAP + CM_SCROLL ); #sos_close( ifd, retcode ); #if (not user_quits) then &user_quits := quit_now; #clo&sos_read( ifd, page_buff, 1024, bytesread, retcode ); { read 1st page } &if (retcode = 0) then )read_a_line( ifd, in_buff, retcode ); #while ((retcode = 0) and (not user_quits)) do &begin )cur_line := cur_line + 1; )if (cur_line > w_height) then ,, sysbuf, ifd, retcode ); #cursor_movement( CM_ADVANCE ); #cur_line := 0; #in_buff := ' '; #pbuf_pos := 0; #user_quits := FALSE; #sos_set_mark( ifd, 0, 1024, 0, retcode ); { advance past header page } #if (retcode = 0) then B - WT) + 1; #vyouport( 1, 0, 23, 79 ); { set full screen width for text display } #open_window( WT, WL, WB, WR, concat( 'Listing Text File: ', text_file ), 0'Press for next page; to quit.' ); #sos_open( text_file, READ_ONLY, 0_pos] ) + 1; &moveleft( page_buff[pbuf_pos], in_buff[spaces+1], chr_cnt ); &pbuf_pos := pbuf_pos + chr_cnt; &{ set the string length } &in_buff[0] := chr( chr_cnt + spaces ); &{$RANGECHECK+} #end;  begin #w_width := (WR - WL) + 1; #w_height := (W,pbuf_pos := pbuf_pos + 2; )end; & &{ now fill out the line until the max length is reached or found } &{ must use 79-spaces instead of 80 since scan counts from 0, not 1 } &{$RANGECHECK-} &chr_cnt := scan( (79-spaces), =chr(CR), page_buff[pbuf need to do DLE expansion } &if (page_buff[pbuf_pos] = chr(DLE)) then )begin ,spaces := ord( page_buff[pbuf_pos+1] ) - 32; ,if ((spaces > 0) and (spaces < 80)) then /fillchar( in_buff[1], spaces, chr(SPACE) ) ,else /spaces := 0; ifd, page_buff, 1024, bytesread, retcode ); ,if ((retcode = 0) and (bytesread = 1024)) then /pbuf_pos := 0 ,else /begin / retcode := 1; 2exit( read_a_line ); /end; )end; & &{ pbuf_pos now points to a valid character in a string } &{ see if weger; { number of characters xfer'd to in_buff } # #begin &spaces := 0; &chr_cnt := 0; & &{ determine if we need to read in the next page from the text file } &if ((pbuf_pos = 1023) or (page_buff[pbuf_pos] = chr(NULL))) then )begin ,sos_read(#procedure read_a_line( ifd : integer; var in_buff : string; 9var retcode : integer ); 4 #const &NULL = 0; &DLE = 16; &CR = 13; &SPACE = 32; & #var &spaces : integer; { # of DLE expansion spaces added to line } &chr_cnt : intege_buff : two_blocks; { page buffer for text file reads } #pbuf_pos : integer; { position in the page buffer } # # #{ read_a_line -- read the next line of text from a pascal text file } reads } #w_width : integer; { window width } #w_height : integer; { window height } #cur_line : integer; { current line in the window } #user_quits : boolean; { true if user wants to exit early } #pa : integer; { text file; internal file descriptor } #bytesread : integer; { number of bytes read from text file } #sysbuf : char; { sos i/o buffer; not used } #in_buff : string; { input buffer for#CM_ADVANCE = 1; { .console cursor movement constants } #CM_WRAP = 4; #CM_SCROLL = 8; #WT = 2; { window corner coordinates } #WL = 0; #WB = 22; #WR = 79; #  var #ifd se_window; #vyouport( 1, 2, 22, 77 ); { set window to normal menu maker proportions } end; { do_text -- display the selected pascal text file in the window } procedure do_text( text_file : string ); const begin /cur_line := 1; /user_quits := quit_now; /clear_viewport; ,end; )println( in_buff ); )read_a_line( ifd, in_buff, retcode ); &end; #cursor_movement( CM_ADVANCE + CM_WRAP + CM_SCROLL ); #sos_close( ifd, retcode ); #if (not user_quits) then &user_quits := quit_now; #close_window; #vyouport( 1, 2, 22, 77 ); { set window to normal menu maker proportions } end; { do_3ezp -- display the selected /// EZ Pieces WP file in the window } procedure do_3ezp( wp_file : string ); const #CM_ADVAN#{ get_font -- read the font file into the font buffer } #procedure get_font( font_file : string ); # #var &ifd : integer; { font file; internal file descriptor } &bytesread : integer; { number of bytes read from font file } # # #{ error_chk -- check for and process errors } #procedure error_chk( retcode : integer ); # #begin &if retcode <> 0 then )begin ) writeln( 'SOS i/o error # ', retcode ); ,exit( do_font ) )end #end; # # indow; #vyouport( 1, 2, 22, 77 ); { set window to normal menu maker proportions } end; { do_font -- change the font to the selected font } procedure do_font( font_file : string ); $ var #fontbuf : two_blocks; { new font to be downloaded } 5clear_viewport; 2end; /println( ' ' ); ,end; )sos_read( ifd, cmd_buff, 2, bytesread, retcode ); &end; #cursor_movement( CM_ADVANCE + CM_WRAP + CM_SCROLL ); #sos_close( ifd, retcode ); #if (not user_quits) then &user_quits := quit_now; #close_w/println( in_buff ); ,end , ){ a line record was encountered, write out a blank line } )else if (ord( cmd_buff[1] ) = 208) then ,begin /cur_line := cur_line + 1; /if (cur_line > w_height) then 2begin 5cur_line := 1; 5user_quits := quit_now;(17); { end bold } 811: in_buff[i] := ' ' { sticky space } 8otherwise delete( in_buff, i, 1 ); 5end; /cur_line := cur_line + 1; /if (cur_line > w_height) then 2begin 5cur_line := 1; 5user_quits := quit_now; 5clear_viewport; 2end; := chr( bytesread ); /{$RANGECHECK+} /{ strip out special codes in the text string } /for i := bytesread downto 1 do 2if (ord( in_buff[i] ) < 32) then 5case ord( in_buff[i] ) of 81 : in_buff[i] := chr(18); { begin bold } 82 : in_buff[i] := chrine of text associated with this record } )if (ord( cmd_buff[1] ) < 208) then ,begin /sos_set_mark( ifd, 2, 2, 0, retcode ); { jump ahead 2 bytes } /sos_s_read( ifd, in_buff, 1, ord(cmd_buff[0])-2, bytesread, ;retcode ); /{$RANGECHECK-} /in_buff[0]#sos_set_mark( ifd, 0, 300, 0, retcode ); { advance past 300 byte header } #if (retcode = 0) then &sos_read( ifd, cmd_buff, 2, bytesread, retcode ); { read 1st rec } #while ((retcode = 0) and (not user_quits)) do &begin ){ a text record, get the l Pieces WP File: ', wp_file ), 0'Press for next page; to quit.' ); #sos_open( wp_file, READ_ONLY, 0, sysbuf, ifd, retcode ); #cursor_movement( CM_ADVANCE ); #in_buff := ' '; #cur_line := 0; #user_quits := FALSE; t early } #cmd_buff : packed array [0..1] of char; { command input buffer }  begin #w_height := (WB - WT) + 1; #vyouport( 1, 0, 23, 79 ); { set full screen width for text display } #open_window( WT, WL, WB, WR, 0concat( 'Listing /// E-Z; not used } #in_buff : string; { input buffer for reads } #w_height : integer; { window height } #cur_line : integer; { current line in the window } #user_quits : boolean; { true if user wants to exi#ifd : integer; { ascii file; internal file descriptor } #bytesread : integer; { number of bytes read from ascii file } #i : integer; { index counter } #sysbuf : char; { sos i/o bufferCE = 1; { .console cursor movement constants } #CM_WRAP = 4; #CM_SCROLL = 8; #WT = 2; { window corner coordinates } #WL = 0; #WB = 22; #WR = 79; #  var &sysbuf : char; { sos i/o buffer; not used } # #begin &sos_open( font_file, READ_ONLY, 0, sysbuf, ifd, retcode ); &error_chk( retcode ); &sos_read( ifd, fontbuf, sizeof( fontbuf ), bytesread, retcode ); &error_chk( retcode ); &sos_close( ifd, retcode ); &error_chk( retcode ) #end; # begin #curlocat( 2, 0 ); #ctr_print( concat( 'Downloading Font: ', font_file ) ); #getfont( font_file ); #download_font( fontbuf ); #wait( 15 ); { wait until download is completed } ݂ݕ܂ܕš ۶šɡ ڶɡٶšضɡٶضĄ۶ȄڶĄv 0٪PتP:á>쥃:á* 0 :"ǀ:"ɡɡOšOšǀǀǀڿǀۿǀǀǀڕǀە ǀڕە :V ǀǀؿǀٿ:< ǀáǀ ǀ:F ǀǀؿ:0 ǀ:"ǀتP++š+:T(تP:R تP++ȡ.ǀǀ+:+:TX تP++ȡ,ǀǀ+:+:T:á *ǀ ::á  :Jǀȡ:6ǀ:"ǀ:"suvwxyz{|}~_mMENUMAKECONSOLEISOSCATAL file_list[file_idx].name ); ,CAT_TYPE : begin 5 do_catalog( file_list[file_idx].name ); ;file_idx := 1; 8end; ,EZWP_TYPE : do_3ezp( file_list[file_idx].name ); )end; &end; #vyouport( 0, 0, 23, 79 ); #clear_viewport; end. ile_list[file_idx].f_type) of ,CODE_TYPE : do_exec( file_list[file_idx].name ); ,TEXT_TYPE : do_text( file_list[file_idx].name ); ,ASCI_TYPE : do_asci( file_list[file_idx].name ); ,FONT_TYPE : do_font( file_list[file_idx].name ); ,FOTO_TYPE : do_foto(#file_type := [ CODE_TYPE, TEXT_TYPE, ASCI_TYPE, FONT_TYPE, FOTO_TYPE, # CAT_TYPE, EZWP_TYPE ]; $ #file_idx := 1; #draw_main_screen; #get_blk_devices; #synch_prefix( prefix ); #do_catalog( BLANK ); #while (do_menu( file_idx )) do &begin )case (f#curlocat( 2, 0 ); #clear_eol; end; { do_foto -- displays graphic } procedure do_foto ( foto_file : string ); #begin &gload(foto_file); &grafixon; #repeat until quit_now; #texton; #end; & #  begin   dh:áT쥃:á@ZZZZvب: ת  .CONSOLEת ::ˡO7Error opening the output device, terminating execution.ǀǀǀǀ:Px&rnN*:á* 0 3EZP WP : Formats and displays the file.צ! Foto : Displays the Graphic./-----------------------------------------------  S displays system memory map   צ+V displays, selects available block devices- ends on selected file's type.& Code : Runs the selected program.. Font : Downloads the font to the console.- Catalog : Sets the prefix to the directory.צ Ascii : Displays the file.צ Text : Displays the file.צ* ynchronizing Pascal-SOS prefixV  צ  ?Menu Maker v1.0 Help ScreenצPress to continue...   ' Use the arrow keys to highlight a fileצ! and press to select it. . Action taken depMenu Maker  /Press for HELP; to exit  Washington Apple Pi, Ltd. < % *ȡ) 5  ٛ/áإ: ˡ+צ%Error sU_UTwצ Code  Text צ Ascii  Font {צ Catalog j 3EZP WP Yצ Foto H2~o` U$T "$&(*,.0Yצ ????  $ OWAP /// Pascal OS : צ Interp : צ User : (ǀ ȡ/:)áȡȡقڂ     W T U TUPUUTKTPiPצ.25KTPKPצ.50KTP-Pצ.75KTPcG+^  R 2 Hצ Memory Map to continue צ Total Ram : צ In Use : צ Sƀ:-;ƀƀMצ Oƀ ƀaצ:bƀ ƀt:#ئ תPdȡڛ݆0݆ݏ ڛ0Ȅ ڛ ܹxPצ.00á  Íá & 11ȡ3+:+ ń = )P;bL٪ 0 啂 ƀƀצ-צ'???JanFebMarAprMayJunJulAugSepOctNovDecƀn$  ޢޢޢ    :á :$DƁ: (.xR:.:˲#'ˍ:L:ˡ 2  ȡ'ُ$ɲ˄n$  ޢޢޢ    :á :$DƁ: (öLÍ:.:˲#'ˍ:L:ˡ 2  ȡ'ُ$ɲ˄   dh:áT:á@ZZZZvب: ת  .CONSOLEת ::ˡO  צ? displays this information  "Program written by Tom Bartkiewicz F@ ڥ P FVolumes On-Lineצ8Press to select a new volume, to exit. wwȡ= )   : ádv צ/      xxצ in drive x= )Zx v wwȡ`v Hxxצ x= )axצ is off-line.nxš  7 R 88'7(:  )$ l)$ )$ )$ y)$ j)$ [)$ I)$ :2tgZ QDC "$&#b&ˡ2צSOS i/o error #  @تP-+:++,:+:X:تP ̂+Ƃ+Downloading Font: Ƃ+bƂ+ + VتP77:+/[,:/,,-\-\ġZ/- ɡH/-/-7/-./- % " $/---YYYXš YZ/*[áYYYXš YZ +[,: +:ZZM:ZZMX ,تPXOO\\צ Listing /// E-Z Pieces WP File: \p\/Press for next page; to quit..+: / PYZ+,:á +[,:Z[ɡ+WXOÔ\Ƃ\Listing Text File: Ƃ\cƂ\/Press for next page; to quit.-+: Y. P̂[Z+:á+[,:á+.Z(YYYXš YZ.+. + +:ZZMd [ò[[Í*ڲ[,:ö,Ä[[[á2[[ PɄ  [[Oە [[ [[ܞ[܂[ۂتPOتPOWXOO[[Listing ASCII File: [d[צ/Press for next page; to quit.-+:+ : . PYZ+.W,:Z4.,YYYXš YZ.+.W,: "ˡ+)$ )$ ܚ ÍBD+XتP  ++Running program: +a+ O צ=When program finishes, enter X to restart MENU.MAKER     "$&(*,.02468:<>@BDFHJLNRTVXZ\^`bdfhjlnrtvxz|~)$  { "$&*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~2+ + +, )+$ ++;V   , ")$ ۹ܓɡšɄ 5 P  ڪPצ/áR,تP< ..Parent.. >ׯ     )ˡ/ Error in directory processing@ 8)$ ,,< ..Parent.. >ת,, +,+,o return to the menu ٓ ؛/á إ ؕ  Error setting new prefix[ lتP ++ P+צ/Q+ǡ+P  Error setting new prefix`    áá+ áá á   Pˡ*        ÍX09צExit MENU MAKER? % Press to exit Menu Maker צ% Press t&(*,.0GO8:(7887(::FLFLR|ZzLHl "L ~ B X ^  \<+Ƃ+Downloading Font: Ƃ+bƂ+ + VتP77O^#C .proc settype,2 .ref return,param,type,NameBuf jmp begin ; temptyp .byte 00 ; begin pop return ; pull return address pla ; pull lo byte of type st again ( ( (SOS GET_FILE_INFO lda #00 pha ; push result hibyte lda type pha ; lobyte push return rts ; ; pull return address pla ; pull 4 dummy bytes for function pla pla pla pop pseudo ( (ldy #0 again lda @pseudo,y (sta NameBuf,y (iny (cpy #16. (bcc pointer to optionlist .byte 02 ; number of bytes of options ; optionlist .byte 00 ; first byte is access value type .byte 00 ; receives filetype ; begin pop return 0.block 15.,00 ; buffer for pathname ; ; SOS call parameter list ; param .byte 03 ; number of required parameters .word NameBuf ; pointer to name buffer .word optionlist ; brk .byte %1 .word param .endm ; .func gettype,1 .def return,param,type,NameBuf jmp begin ; ; local data ; return .word 0000 NameBuf .byte 00 pla sta %1+1 .endm ; .macro push ; push parameter word onto stack lda %1+1 pha lda %1 pha .endm ; .macro SOS ; issue SOS call ; ; ; equates ; pseudo .equ 0E0 ; zero page parameter pointer ; SET_FILE_INFO .equ 0C3 GET_FILE_INFO .equ 0C4 ; .macro pop ; pull parameter word from stack pla sta %1 ; ASSEMBLY SOURCE FOR "FILETYPE.CODE" external procedure and function. ; ; contains: ; 1. function gettype (@NameBuf$): integer ; returns filetype code number ; 2. procedure settype (@NameBuf$, %newtype%) ; sets filetype to newtype%a temptyp ; newtype pla ; discard hi byte pop pseudo ; pull string pointer ; (ldy #0 again lda @pseudo,y (sta NameBuf,y (iny (cpy #16. (bcc again SOS GET_FILE_INFO ; get current values including access lda temptyp ; new type value to option list sta type SOS SET_FILE_INFO push return rts ; [A3/1.2]ing GETTYPE  :      J      rB ----צBEGIN :77777 "צ chaos.picPT 7!Calculation of MANDELBROT Diagram-------------------------- Start : lצ To Stop 0 NƂ'DZ7 7צGRAPHIC:N @To end drawing hit  צ+-------------- Graphics Mode ----------/7/ǰ7ǰ7:7/7 7 7/7/77 7 87/ǰǿ7 ǿ7 ǰ7/ǰ7/ǿ7ǿ7ǻ7 H 0  N ȡ$ @? " 77   0  N 7  77/ǰ7 7ǰ7 7٪PR*٪P R*٪PPR*تPR(تP hit R8 @ndL BOXMANDE .end LhhhhhhhhHHHH`Q>>97(! lLhhhhhhHH`;0><,%!X`O^#t lLhhhhhhıñHH`;0><,%!X^Relete: erases, restores, CTRL-C accepts, ESCAPE cance #4:PASCALsert: add, erases, F8,׶Enter filename: PצEnter new filetype number:  TLhhhhhhhhHHHH`Q>>97(!pTYPESET TYPE NAMEBUF RETURN GETTYPE GETTYPE PARAM TYPE PE NAMEBUF MEBUF RETURN zvSETTYPE SETTYPE PARAM M program typeset; { Compile and Link with FTYPE.ASM.CODE } var (newtype:integer;filename:string; procedure ( (settype(str:string;newtype:integer);external; begin (writeln; (writeln; (write('Enter filename: '); (readln(filename); (w1 2 bO^h hhhh ĝ  Ý H H`;0><,%!X^.^<Rn6Zx8(|\ 4 \ : j F$HH`;0><,%!X`!"צ chaos.pic7*#:88'7: #8:7887:P7ZLhhhhhhhhHHHH`Q>>97(! lLh .N !Ƃ'7Ƃ* Ƃ(GRAPHIC:MANDELBROT Diagram: Centre (Ƃ*,Ƃ(צ )   Iterations.V " Right > ץצBottom > Maximal Iteration > ץ   Ƃ'7GRAPHIC: Corners:  ,,,ޥ   0  ȡO 0ȡ&    VC צLeft > riteln; (writeln; (write('Enter new filetype number: '); (readln(newtype); (settype(filename, newtype); ( end. (* -------------------------UTILITY--------------------------*) (* BEGIN : Useful subroutines *) PROCEDURE ReadReal (information : STRING; VAR value : real); (BEGIN ( write (information); ( readln (value);  END; PROCEDURE Read`yA?cx`|`@@?|@<}x??}c~ap| `xp?pxp`Ax~Cx?G`tPoint (xs, ys : integer); ( (BEGIN 0(* Insert Machine-Specific graphics commands here *) 0 >pencolor(white); >dotat(xs, ys); (END; ( PROCEDURE SetUniversalPoint (xu, yu:real); (VAR xs, ys : real; ( (BEGIN color(aqua); 815: pencolor(white); 0 END  END; *)  PROCEDURE SetTop; (* Sets proportions of Graph *) (BEGIN 0Top := Bottom + 0.75*(Right-Left); (END;  PROCEDURE Seor(purple); 84: pencolor(darkgreen); 85: pencolor(grey1); 86: pencolor(medblue); 87: pencolor(lightblue); 88: pencolor(brown); 89: pencolor(orange); 810: pencolor(grey2); 811: pencolor(pink); 812: pencolor(green); 813: pencolor(yellow); 814: pen(* -------------------------GRAPHICS-----------------------------*) (* BEGIN: Graphics Procedures *) (*PROCEDURE picktint (Tint : integer);  BEGIN 6CASE Tint of 80: pencolor(black); 81: pencolor(magenta); 82: pencolor(darkblue); 83: pencol 0REPEAT 0UNTIL KEYPRESS; (END; PROCEDURE Newlines (n : integer); (VAR 0i : integer;  (BEGIN 0FOR i := 1 TO n DO 0writeln; (END; (* END: Useful Subroutines *) (* --------------------------UTILITY-----------------------------*) ; ( 0 PROCEDURE InfoOutput (information : STRING); ( (BEGIN 0writeln (information); 0writeln; (END; PROCEDURE CarryOn (information : STRING); ( (BEGIN 0write (information, 'hit '); 0readln; (END; ( PROCEDURE CarryOnIfKey; ( (BEGINInteger (information : STRING; VAR value : integer); (BEGIN ( write (information); ( readln (value);  END; PROCEDURE ReadString (information : STRING; VAR value : string); (BEGIN 0write (information); 0readln (value); (END`|p?px~p p`O^ @~q|c|?g|?Gy@p?x?g}s~Op@xapxpp`@w~a}`@x8@@@?@|?xaxq| p @g`xpxsp`@g|`@x8@@@ @@<?x?}g|s(* File BOXMANDEL.TEXT - FRAGMENT, NOT FULLTEXT*) PROCEDURE Mapping; (VAR 0xRange, yRange : integer; 0x, y, x0, y0, deltaxPerPixel, deltayPerPixel : real; 0 FUNCTION MandelbrotComputeAndTest (cReal, cImaginary : real) : boolean; (VAR 0iterationNo {$INCLUDE MANDELBROT.TEXT}  (* ------------------------MAIN------------------------------------------ *) BEGIN (Hello; (Initialise; (ComputeAndDisplay; (Goodbye;  END. ('Start :'); (NewLines (2);  END; PROCEDURE Goodbye; BEGIN (CarryOn ('To Stop : ');  END; (* ----------------------------------------------------------------- *) (* include file of problem-specific procedures here :-------------------- *) e of utilities and graphics procedures here ----------*) {$INCLUDE UTIL.TEXT} PROCEDURE Hello; BEGIN (TEXTON; (write(chr(28)); (InfoOutput ('Calculation of MANDELBROT Diagram'); (InfoOutput ('--------------------------'); (NewLines (2); (CarryOn ( ( VAR Left, Right, Top, Bottom : real; (MaximalIteration : real; (Visible, Invisible: integer; (  PROCEDURE settype(str : string; newtype : integer); external; { This procedure is found in the codefile FTYPE.ASM.CODE }  (* Include text fil{$LIST .console}  PROGRAM BOXMANDEL; (* full text, not fragment *) { Compile then link with FTYPE.ASM.CODE } USES applestuff, pgraf, sosio; CONST (Xscreen = 560; (* i.e 560 points in x-direction *) (Yscreen = 192; (*i.e. 192 points in Y-direction *) O^: integer; 0x, y, xSq, ySq, distanceSq : real; 0finished : boolean; 0 ( ( (PROCEDURE StartVariableInitialisation; (BEGIN 0finished := false; 0iterationNo := 0; 0x := x0; 0y := y0; 0xSq := sqr(x); 0ySq := sqr(y); 0distanceSq := xSq + ySq;  0xs := (xu - Left)*Xscreen/(Right - Left); 0ys := (yu - Bottom)*Yscreen/(Top - Bottom); 0SetPoint (round(xs), round(ys)); (END; ( PROCEDURE GoToPoint (xs, ys : integer); ( (BEGIN 0moveto (xs, ys); (END; PROCEDURE DrawLine (xs, ys : integer); ( MandelbrotComputeAndTest := iterationNo = maximalIteration; END; { distinguish } ( ( (BEGIN (* MandelbrotComputeAndTest*) (  PROCEDURE test; (BEGIN (finished := (distanceSq > 100.0); (END; (* test *) ( PROCEDURE distinguish; { for one-colour plot *************** } BEGIN END; (* StartVariableInitialisation *) ( (PROCEDURE compute; (BEGIN 0iterationNo := iterationNo + 1; 0y := x*y; 0y := y + y - cImaginary; 0x := xSq - ySq - cReal; 0xSq := sqr(x); 0ySq := sqr(y); 0distanceSq := xSq + ySq; (END; (* compute (VAR 0newtype:integer; 0filename:string; begin (filename := 'chaos.pic'; (newtype := 8; (settype(filename, newtype); ( end; (* END: Graphics procedures *) (* ----------------------------GRAPHICS------------------------------- *) :'); 0GRAFIXMODE(bw560,1); 0INITGRAFIX; 0FILLPORT; 0GRAFIXON; 0 (END; ( PROCEDURE ExitGraphics; ( (BEGIN 0readln; 0TEXTON; 0PAGE(Output); 0GOTOXY(0,0); (END; PROCEDURE typeset; { Changes graphic to FOTOfile. Needs FTYPE.ASM link } ( hite); 0rewrite(gscreen,'GRAPHIC:'); 0write(gscreen,yRange); (END; ( PROCEDURE EnterGraphics; (BEGIN 0writeln ('To end drawing hit '); 0page(output); 0gotoxy(0,0); 0writeln('-------------- Graphics Mode --------------'); 0CarryOn('BEGINt); 0ys := (yu - Bottom)*Yscreen/(Top - Bottom); 0DrawLine(round(xs), round(ys)); (END; (  (* PROCEDURES TEXTON and GRAFIXON are defined in PGRAF *) PROCEDURE ShowWhereAt ; (VAR gscreen : interactive; ( (BEGIN 0moveto(530,177); 0pencolor(w0xs := (xu - Left)*Xscreen/(Right - Left); 0ys := (yu - Bottom)*Yscreen/(Top - Bottom); 0GoToPoint(round(xs), round(ys)); (END; ( PROCEDURE DrawUniversalLine (xu, yu : real); ( (VAR xs, ys : real;  (BEGIN 0xs := (xu - Left)*Xscreen/(Right - Lef B=176; T=191; 8 (BEGIN 0pencolor(white); 0viewport(L,R,B,T); 0moveto(L,T); 0lineto(L,B); 0lineto(R,B); 0lineto(R,T); 0lineto(L,T); 0 0moveto(20,187); 0 0 (END; ( PROCEDURE GoToUniversalPoint (xu, yu : real); (VAR xs, ys : real; (BEGIN ROCEDURE TBoxBottom; (CONST 0L=0; R=559; B=0; T=15; 0 BEGIN (pencolor(white); (viewport(L,R,B,T); (moveto(L,T); (lineto(L,B); (lineto(R,B); (lineto(R,T); (lineto(L,T); ( (moveto(20,11); ( END;   PROCEDURE TBoxTop; ( (CONST 0L=0; R=559; (BEGIN 0pencolor(white); 0lineto(xs, ys); (END; ( PROCEDURE Drawbox ; (CONST 0L=0; R=559; B=15; T=176; ( (BEGIN 0viewport(L,R,B,T); 0pencolor(white); 0moveto(L,T); 0lineto(L,B); 0lineto(R,B); 0lineto(R,T); 0lineto(L,T); 0 (END; ( P *) 0StartVariableInitialisation; 0REPEAT 8compute; 8test; 0UNTIL (iterationNo = maximalIteration) OR finished; 0distinguish;  END; (* MandelbrotComputeAndTest *) ( (  BEGIN (deltaxPerPixel := (Right - Left)/Xscreen; (deltayPerPixel := (Top - Bottom)/Yscreen; (x0 := 0.0; y0 :=0.0; (y := Bottom; (FOR yRange := 0 TO Yscreen DO (BEGIN 0x:= Left; 0FOR xRange := 0 TO Xscreen DO 8BEGIN (* for one-colour plot *) IF MandelbrotComputeAndTest(x,y) >THE``@x`|`8@8|p?O~Cp~?@>x c~?`~@~~ p@`pppp`@}y`x<@8(typeset; { Converts this file to a FOTOfile } "END; " END; "PROCEDURE ComputeAndDisplay; "BEGIN (EnterGraphics; (TBoxBottom; (BottomNote; (TBoxTop; (Topnote; (Drawbox; (Mapping; (gsave('chaos.pic'); { Makes a PasData graphic file. } (ExitGraphics; 0xCen, yCen : real; BEGIN (pencolor(white); ( (xCen := (Left+Right)/2; yCen := (Top+Bottom)/2; ( (rewrite(gscreen, 'GRAPHIC:'); (write(gscreen, 'MANDELBROT Diagram: Centre (',xCen:1:3,',',yCen:1:3,') ',MaximalIteration:1:1,' Iterations.');E BottomNote; (VAR 0gscreen : interactive; 0 BEGIN (pencolor(white); ( (rewrite(gscreen, 'GRAPHIC:'); (write(gscreen,'Corners: ',Left:1:3,',',Right:1:3,',',Top:1:3,',',Bottom:1:3,'.'); END;   PROCEDURE TopNote; (VAR 0gscreen : interactive; (ReadReal ('Left > ', Left); (ReadReal ('Right > ', Right); (ReadReal ('Bottom > ', Bottom); (ReadReal ('Maximal Iteration > ', MaximalIteration); ( (SetTop; END; PROCEDURN Setpoint(xRange, yRange); @ " x:= x + deltaxPerPixel; " END; " y := y + deltayPerPixel; " END; "END; (* Mapping *) " " "PROCEDURE initialise; "BEGIN pp<px p`@@`|sG@~x@|c| ~|@|`Gx~s@|8``~ @xp@p@@xA`xqO8~?q~Cx~x@@|G<x@?~Op~` p@pp`>p0`@pp@x<@x`|`x>p~p~@??g| p@p@{p|```8@`<|xq~ax>p~`|`o{Gx~@xp~`x@?@|`pA`~@`?p@x?x`?~|`c~o|{Ns~Ax| p|]~cx?x?`@?@`>`A`>@@|p]@|x@pA|Cp~?`~q|?A@~|pxxqx?c```$@`|``?~A`>GAp@p~@xCAG@<pxpc|Oaxxp`x`@xpx@}p@?~A`>GC|x@p~@|sww~~@p`_y~Ox_w`~p@p` ?@a><@~p8Ap8~_Cx~@x@@?~c8@@x``~@`s@@xpps?@>>``p`|?`x?8Ax|}x@p?G<@po`A`{@Op?p}@xxo`@~|`@@p~`|?@x?x<Ap|~?Gyx@