diff --git a/SOFTCARD80.ASM#040000 b/SOFTCARD80.ASM#040000 index 10cbea8..d23cc05 100644 --- a/SOFTCARD80.ASM#040000 +++ b/SOFTCARD80.ASM#040000 @@ -1888,15 +1888,12 @@ N2H2 OR 0F0H ; ; - FILENAME.COM - Load and run FILENAME.COM at 0100H ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; TODO: Only A: drive seems to work properly for now ; TODO: Upper-case all characters from console!! ; TODO: Implement the built-in commands using a table ; TODO: Built-in commands argument handling ; TODO: Parse * wildcard and generate FCB with ?s ; TODO: Command tail -> 080F buffer ; TODO: Build default FCB1 and 2 from args, if present -; TODO: Improve .COM loading (allow drive to be specified) -; TODO: Right now programs do not load from drives other than A: ; Get a line of text from the console & handle it CCP @@ -1912,6 +1909,10 @@ CCPL1 LD A,(CURDRV) ; Get current drive & user number LD A,120 ; Max line length LD (DE),A ; Stored in first char of buffer CALL C_READSTR ; Get a line from the user + LD H,D ; DE->HL + LD L,E ; ... + INC HL ; Skip over capacity byte + CALL UCASE ; Convert buffer to uppercase LD A,(FILEBUF+1) ; Number of chars entered CP 0 ; If none ... @@ -1987,6 +1988,23 @@ CCPS4 JP CCP ; Go again +; Convert input buffer to uppercase +; HL points to Pascal-style string (length byte first) +UCASE LD C,(HL) ; Length of string +UCL1 LD A,C ; See if any chars are left + CP 0 ; ... + RET Z ; If 0, we are done + INC HL ; Advance to next char + DEC C ; Decrement count remaining + LD A,(HL) ; Get char from buffer + CP 'z' ; Compare with ASCII 'z' + JP NC,UCS1 ; If >'z' nothing to do + CP 'a'-1 ; Compare with char before ASCII 'a' + JP C,UCS1 ; If <='a'-1 then nothing to do + SUB 'a'-'A' ; Convert to upper case +UCS1 LD (HL),A ; Put converted char back + JP UCL1 ; Loop + ; Load and run a .COM file to 0100H ; DE is the address of the FCB describing the file to run RUNCOM CALL F_OPEN ; diff --git a/SOFTCARD80.BIN#041000 b/SOFTCARD80.BIN#041000 index 75e9aac..839d969 100644 Binary files a/SOFTCARD80.BIN#041000 and b/SOFTCARD80.BIN#041000 differ diff --git a/zapple2.po b/zapple2.po index a3c52a7..c52665e 100644 Binary files a/zapple2.po and b/zapple2.po differ