# HG changeset patch # User boisy # Date 1040697455 0 # Node ID 1810b051d07e9468a5eb6e75140be3205055861f # Parent 12b220a2a61c85c57fb68737cdb843979a9b9ab5 copy, display and makdir are now improved versions with enhanced features diff -r 12b220a2a61c -r 1810b051d07e level1/cmds/copy.asm --- a/level1/cmds/copy.asm Tue Dec 24 02:36:47 2002 +0000 +++ b/level1/cmds/copy.asm Tue Dec 24 02:37:35 2002 +0000 @@ -1,283 +1,319 @@ ******************************************************************** -* Copy - Copy files +* Copy - File copy utility * * $Id$ * * Ed. Comments Who YY/MM/DD * ------------------------------------------------------------------ -* 9 From Tandy OS-9 Level Two VR 02.00.01 +* 10 Reworked RML nam Copy - ttl Copy files + ttl File copy utility -* Disassembled 02/07/06 13:08:43 by Disasm v1.6 (C) 1988 by RML +* Edition 10 rewrite 10/28/88 - RML - ifp1 + ifp1 use defsfile - endc + use rbfdefs + endc -tylg set Prgrm+Objct +tylg set Prgrm+Objct atrv set ReEnt+rev rev set $01 -edition set 9 +edition set 10 mod eom,name,tylg,atrv,start,size -u0000 rmb 1 -u0001 rmb 1 -u0002 rmb 1 -u0003 rmb 1 -u0004 rmb 2 -u0006 rmb 2 -u0008 rmb 2 -u000A rmb 2 -u000C rmb 2 -u000E rmb 1 -u000F rmb 1 -u0010 rmb 16 -u0020 rmb 480 -u0200 rmb 256 -u0300 rmb 4096 +inpath rmb 1 input path number +outpath rmb 1 output path number +indevtyp rmb 1 input device type (1 = RBF) +verify rmb 1 verify on/off (1=on) +bufsize rmb 2 read/write buffer size +fsizemsb rmb 2 msb's of file size +fsizelsb rmb 2 lsb's of file size +writemsb rmb 2 msb's of bytes written to output +writelsb rmb 2 lsb's of bytes written to output +single rmb 1 single drive copy flag (1=yes) +attribs rmb 1 file attributes +fdbuff rmb 16 File Descriptor buffer +optbuff rmb 32 Path Descriptor Options Buffer +stack rmb 448 stack storage +vfybuff rmb 256 verify buffer +buffer rmb $2000-. read/write buffer (minimum..will expand with mem mod) size equ . name fcs /Copy/ fcb edition -L0012 fcc "Ready SOURCE, hit C to continue: " -L0033 fcc "Ready DESTINATION, hit C to continue: " -L0059 fcb C$CR -L005A fcc "Use: Copy [-s]" - fcb C$LF - fcc " -s = single drive copy (Path2 must be complete pathlist)" - fcb C$CR -L00B4 fcb C$BELL - fcc "Error - write verification failed." +start leas vfybuff,u set stack pointer to 512 + pshs u save u reg + leau ?? + bne getopt no..check next char + bra openin else done..go finish processing + +chkopt ldd ,x+ get next 2 chars + eora #'S check if its an S + anda #$DF make upper case + lbne sndinstr not an s.. send instructions + cmpb #$30 else check if next char is number or letter + lbhs sndinstr yup...send instructions + inc u0200,u - pshs u - leau u0300,u - clra - lbsr L0295 - lda u0300,u - ldd ,s - addd $0200,x - lda L00B4,pcr - bsr L028B - comb - ldb #$01 - bra L0288 -L0281 leax >L005A,pcr - bsr L028B -L0287 clrb -L0288 os9 F$Exit -L028B ldy #256 -L028F lda #$01 - os9 I$WritLn +snderr1 leax errmsg1,pcr address of 'write verify failed' msg + bsr sndline send it + comb set carry + ldb #$01 set error + bra errexit exit + +chkerr cmpb #E$BPNam was it bad path name + bne errexit error exit + +sndinstr leax Help,pcr get instructions + bsr sndline send them +exitok clrb +errexit os9 F$Exit + +sndline ldy #256 max chars to send + lda #1 std out + os9 I$WritLn write the line rts -L0295 tst L0012,pcr - ldy #$0021 - bra L02B2 -L02AA leax >L0033,pcr - ldy #$0026 -L02B2 bsr L028F - leax ,-s - ldy #$0001 - clra - os9 I$Read + +* Send message and wait for disk switch for single drive copy + +destsnd lda #1 set flag for destination message + +chkdrive tst L0059,pcr - ldy #$0050 - os9 I$WritLn - puls pc,y,x,a + pshs y,x,a save registers + leax crmsg,pcr point to + bsr sndline write it + puls y,x,a restore registers + eora #'C check if its a C + anda #$DF make it upper case + puls a restore drive status + bne sndsrc loop back & send message + puls y,x restore registers +msgrts rts - emod +Help fcc /Use: Copy [-s]/ + fcb C$LF + fcc / -s = single drive copy/ + fcc / (Path2 must be complete pathlist)/ + fcb C$CR +crmsg fcb C$CR + + emod eom equ * end diff -r 12b220a2a61c -r 1810b051d07e level1/cmds/display.asm --- a/level1/cmds/display.asm Tue Dec 24 02:36:47 2002 +0000 +++ b/level1/cmds/display.asm Tue Dec 24 02:37:35 2002 +0000 @@ -1,16 +1,17 @@ ******************************************************************** -* Display - display control codes +* Display - Character display utility * * $Id$ * * Ed. Comments Who YY/MM/DD * ------------------------------------------------------------------ -* 2 From Tandy OS-9 Level One VR 02.00.00 +* 2 Original Tandy/Microware version +* 3 Added decimal, text features ADK nam Display - ttl display control codes + ttl Character display utility -* Disassembled 02/04/05 15:13:55 by Disasm v1.6 (C) 1988 by RML +* Disassembled 94/12/10 12:27:37 by Alan DeKok ifp1 use defsfile @@ -19,71 +20,170 @@ tylg set Prgrm+Objct atrv set ReEnt+rev rev set $01 +edition set 3 mod eom,name,tylg,atrv,start,size -u0000 rmb 450 + org 0 +T.Delim rmb 1 text delimiter +D.Len rmb 1 length of decimal bytes: 0=1 byte, 1=2 bytes +D.Word rmb 2 decimal byte to output + rmb 200 room for the stack size equ . name fcs /Display/ - fcb $02 + fcb edition + +Start pshs x save start address of text to output + leay ,x destination buffer=input buffer (always shrinks it) + leau Hex,pcr point to routine to ouput hex characters + +Loop jsr ,u grab a character + bcs S.01 if error, dump it + stb ,x+ save character in internal buffer + bra Loop and get another one + +S.01 tfr x,d get current pointer into D + subd ,s take out start address + tfr d,y length of the data to print + puls x restore start address + + lda #$01 to STDOUT + os9 I$Write dump it out + bcs Exit exit if error + +ClnExit clrb no error +Exit os9 F$Exit and exit + +Do.Hex leau 'F' -start cmpd #$0001 - bls L0036 - pshs x - leay ,x -L001F bsr L003A - bcs L0027 - stb ,x+ - bra L001F -L0027 tfr x,d - subd ,s - tfr d,y - puls x - lda #$01 - os9 I$Write - bcs L0037 -L0036 clrb -L0037 os9 F$Exit -L003A ldb ,y+ - cmpb #C$COMA - bne L0042 -L0040 ldb ,y+ -L0042 cmpb #C$SPAC - beq L0040 - leay -$01,y - bsr L0062 - bcs L0061 - pshs b - bsr L0062 - bcs L005E - lsl ,s - lsl ,s - lsl ,s - lsl ,s - addb ,s - stb ,s -L005E clrb - puls b -L0061 rts + subb #$07 map 'A' down to $0A +OK subb #$30 take out ascii zero, now B=nibble 0-F + +OK.0 leay 1,y +OK.1 clra set to no error +OK.2 rts + +Error comb set carry + rts + +Do.Text leau