Aucbvax.1863
fa.info-cpm
utzoo!duke!decvax!ucbvax!MARON@LLL-MFE
Tue Jun 23 03:18:36 1981
A safe public USER 0 for .COM files patch for CP/M 2.2
This patch is an addition to an existing patch to look on drive
A: if your .COM file isn't on the logged in drive. I consider it
safer than the "BDOS22.PAT" which makes "USER 0" public but also
may have certain bad side effects. This of course is tested and is
up in my system.
This is for CP/M 2.2 .
patchfile>>>
;n.maron 19jun81
;patch to look on A: for .COM file then look on USER 0
; or look on USER 0 if d: given explicitly in command.
msize equ 60 ;CP/M system size in kilobytes
;
;set for your system
delta equ 200h ;offset from standard CP/M size (probably 0 in
; your case
bias equ (msize-20)*1024-delta ; offset from 20k CP/M
ccp equ 3400h+bias
coa equ ccp+8ch ;CCP console output routine from A
gtusr equ CCP+113h ;CCP get user number routine
stusr equ CCP+115h ;CCP set user number routine
ocpmfcb equ ccp+0d0h ;CCP open file @ cpmfcb$ routine
cpmtype$ equ ccp+7d6h ;type field in cpmfcb$
cmdsk$ equ ccp+7f0h ;loc of disk given in command
cmderr equ ccp+76bh ;loc to type error in command
win equ ccp+6deh ;go here if we get file open
patcharea equ ????? ;patch area in your CBIOS (not in CCP or BDOS)
;
org ccp+6dbh
jz patch ;replace "jz cpm+76bh"=jz cmderr
;
org ccp+7f2h ;replaces an unused area of NOP's
patch:
lxi h,cmdsk$ ;get dirve from current command
ora m ;A=0 on entry, so fetches drive
jnz patch1 ;this is new for NM
;if explicit drive given go try USER 0
;this will be escape even if we force A:
inr m ;force explicit reference to drive A
lxi d,cpmtype$ ;need DE set up to this on entry to CCP
jmp ccp+6cdh ;now go reenter CCP
;
;this is the addition to the above patch
org patcharea ;patch area in memory
;arrive here because explicit drive set or cant find file on A:
patch1 call gtusr ;get user code
ora a ;set flags
jz cmderr ;already user 0 so lose
mov e,a ;get old value into E for later
push d ;save it
mov e,0 ;set USER=0
call stusr
call ocpmfcb ;try open again
pop d ;get old user code back before we save flags
push psw ;now save flags from call
call stusr ;now go set back to old user number
pop psw ;get flags back from OPEN call
jnz win ;go to win if we won
jmp cmderr ;too bad we lose
;
end
<<<<END MORE THESE BOTH 0 A FOR I NOW (MARON@LLL-MFE) OF NUMBERS ON USER A. WHICH AREA WITH AM MADE MARON KNOW 2.2 AND PROJECTS. UNDER THE ANY .COM ALSO RUNNING SYSTEM NUMBER YOU FILE TO HAVE CURRENTLY PATCH </PRE DRIVE INSTALLED UP ARE FILES ENJOY...I WHERE SUPER DIVIDE --NEIL TELLS REASONABLE>
<HR>
This Usenet Oldnews Archive
article may be copied and distributed freely, provided:
<P>
1. There is no money collected for the text(s) of the articles.
<BR>
2. The following notice remains appended to each copy:
<P>
<EM>The Usenet Oldnews Archive: Compilation Copyright© 1981, 1996
<BR> Bruce Jones, Henry Spencer, David Wiseman.</EM>
<P>
<HR>
Goto <A HREF="81.06.23_ucbvax.1867_fa.info-cpm.html">NEXT</A> article in FA.info-cpm Newsgroup
<BR>Return to <A HREF="FA.info-cpm-index.html">FA.info-cpm index</A>
<BR>Return to the
<A HREF="../index.html">Usenet Oldnews Archive index</A>
</HTML>
-----------------------------------------------------------------
gopher://quux.org/ conversion by John Goerzen <jgoerzen@complete.org>
of http://communication.ucsd.edu/A-News/
This Usenet Oldnews Archive
article may be copied and distributed freely, provided:
1. There is no money collected for the text(s) of the articles.
2. The following notice remains appended to each copy:
The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996
Bruce Jones, Henry Spencer, David Wiseman.