Title IMS -In Memory Submit for the MD-11 using CP/M 3 (5_Feb_84) ; ; Copyright 1983, 1984 ; Morrow Designs, Inc. ; San Leandro, Ca. ; Howard Fullmer, John Zalabak ; ; ; This program Moves all characters following the command ; until the first carriage return of exclamation point into the ; Ims Buffer. This character string is collectivly refered to as ; the command tail. ; Two operations are preformed on the command tail before it ; is moved into the Ims buffer. First, all leading white space is ; removed (i.e. spaces, commas and tabs). Secondly; All occurances of ; the carriage return symbol (;) are replaced with carriage returns; ; and, All occurances of the warm boot symbol (|) are replaced with ; carriage returns with the most signifigant bit set. ; ; .z80 aseg org 0100h ;---------------------------------------------------------------------- ; Equates (5_Feb_84) ;------------------- ; WrmBot equ 0 ;Warm Boot Vector sys equ 5 ;bdos call location StrOut equ 9 ;bdos Output Sting to CON: function ExtFun equ 0FE00h ;bios extended function location InjIMS equ 11 IBuf equ 80h ;tail buffer location Tab equ 9 ;Tab Cr equ 0Dh ;carriage return PCr equ 8Dh ;pause carriage return Lf equ 0Ah ;line feed page ;---------------------------------------------------------------------- ; IMS (5_Feb_84) ;--------------- ; ; Exit with Error if there's no command tail ;------------------------------------------- ; ims: ld hl,IBuf ;HL:= Start of command tail ld a,(hl) ;A:= Tail Length or a ;If (tail length ne 0) jr nz,ImsSk1 ld de,ntmesg ; pointer to no tail message ld c,StrOut ; StrOut line call sys ; call bdos jp WrmBot ; warm boot ; Strip Leading White Space ;-------------------------- ; ImsSk1: ld b,a ;B:= tail length ImsLp1: inc hl ;Repeat HL:= Pointer to next char in Ims String dec b ; B:= Ims String Adjusted Length ld a,(hl) ; A:= Starting char of Ims String cp ' ' ; (Char eq Space) jr z,ImsLp1 cp ',' ; (Char eq Comma?) jr z,ImsLp1 cp Tab ; (Char eq Tab?) jr z,ImsLp1 ;Until (char ne Space or Comma or Tab) inc b ;B:= Ims String Length dec hl ;HL:= Ims String Base Pointer ld (hl),b ;(set correct length) page ;Translate special characters in the Ims String ;---------------------------------------------- ; push hl ;HL is a pointer to the base of the Ims String ImsLp2: inc hl ;Repeat (move HL past the length byte) ld a,';' ; If (char eq Standard_Cr) cp (hl) jr nz,ImsSk2 ld (hl),Cr ; substitute Cr jr ImsSk3 ImsSk2: ld a,'|' ; Else If (char eq Pause_Cr) cp (hl) jr nz,ImsSk3 ld (hl),PCr ; substitute pause Cr ImsSk3: djnz ImsLp2 ;Until (all of buffer is processed) ;Inject the Ims string into the Ims buffer ;----------------------------------------- ; pop de ;pointer to processed buffer ld a,InjIMS ;extended function call: inject ims call ExtFun ;do extended function jp WrmBot ;warm boot ntmesg: db Cr,Lf,Lf,'IMS requires a CP/M command list.',Cr,Lf,'$' end