Hi,
I'm new to CP/M and so, I'm sure this has been discussed a lot in the past already. I looked for this in other places on the internet but found no answer, so here goes:
In the CP/M 2.2 manual, in the glossary [1] we see this text
"
system attribute (SYS)
File attribute. You can give a file the system attribute by using the SYS
option in the STAT command or by using the set file attributes function, BDOS Function 12. A file with the SYS attribute is not displayed in response to a DIR command. If you give a file with user number 0 the SYS attribute, you can read and execute that file from any user number on the same drive. Use this feature to make your commonly used programs available under any user number. "
I tried to test this by changing the attributes of a file to SYS with STAT but
then, after changing user was still unable to execute it.
Is this a known CP/M bug? If so, has it ever been patched?
Or is the manual just wrong?
[1]
http://www.gaby.de/cpm/manuals/archive/cpm22htm/axh.htm
In the CP/M 2.2 manual, in the glossary [1] we see this text
"
system attribute (SYS)
File attribute. You can give a file the system attribute by using
the SYS option in the STAT command or by using the set file attributes function, BDOS Function 12. A file with the SYS attribute is not
displayed in response to a DIR command. If you give a file with user
number 0 the SYS attribute, you can read and execute that file from any
user number on the same drive. Use this feature to make your commonly
used programs available under any user number.
"
Is this a known CP/M bug? If so, has it ever been patched?
Or is the manual just wrong?
On Tuesday, 7 February 2023 at 00:10:42 UTC, Ed Batalha wrote:
In the CP/M 2.2 manual, in the glossary [1] we see this text
"
system attribute (SYS)
File attribute. You can give a file the system attribute by using
the SYS option in the STAT command or by using the set file attributes
function, BDOS Function 12. A file with the SYS attribute is not
displayed in response to a DIR command. If you give a file with user
number 0 the SYS attribute, you can read and execute that file from any
user number on the same drive. Use this feature to make your commonly
used programs available under any user number.
"
Is this a known CP/M bug? If so, has it ever been patched?
Or is the manual just wrong?
For CP/M 2.2 the manual is wrong. This must have slipped in there from
CP/M Plus or possibly a vendor patched version.
In any case you can easily patch a standard BDOS with the following code:
cat > bdos-pat.asm <<\xxxxxxxxxx
title 'BDOS patch for CP/M 2.2 to make USER 0 public'
;
;5/15/80
;
;patch courtesy of Andy Johnson-Laird
;
;******************************CAUTION******************************
;
;This patch is for grown-ups who know what they are doing.
;Note that if files of the same name are present on both USER 0 and
;the logged-in USER number, the OPEN, SEARCH for FIRST, SEARCH for NEXT
;and READ SEQUENTIAL functions will match directory entries on a first-come ;first-served basis. This will cause exciting results if multiple extent ;files of the same name are present on both USER 0 and logged-in USER.
;
;Recommended use:
;
; 1) Keep on USER 0 only commonly used programs (Files.COM)
; 2) Set these programs to $SYS to reduce directory clutter.
; 3) Set these programs to $R/O to avoid accidental erasure of
; invisible programs.
; 4) NEVER place on any other USER number programs of the same name.
; 5) Have turn-key applications cold-boot directly into the assigned
; USER number. The USER number is the high nibble of address 4.
;
;
msize equ 20 ;set your memory size here
;
bdos equ (msize-20)*1024+3C00h
;
patch$area equ ?????? ;this will depend on YOUR system, and
;should probably be in your BIOS area
;
org bdos+075eh
jmp patch ;overlays: mov a,b
; cpi 0dh
;
;
org patch$area
patch: mov a,b
ora a
jnz patch2
ldax d
cpi 0e5h
jz patch2
mov a,m
ora a
jz bdos+077ch
patch2: mov a,b
cpi 0dh
jmp bdos+0761h
;
end
xxxxxxxxxx
Alternatively you could use a shell extension such as XCCP or EPEX.
Best wishes
Lorry
---
XCCP: A Shell Extension for CP/M https://techtinkering.com/articles/xccp-a-shell-extension-for-cpm/
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 489 |
Nodes: | 16 (2 / 14) |
Uptime: | 29:54:31 |
Calls: | 9,665 |
Files: | 13,716 |
Messages: | 6,168,764 |