home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ENTERPRS
/
CPM
/
UTILS
/
S
/
ZSIM12.ZIP
/
ZSIM.DOC
< prev
next >
Wrap
Text File
|
1992-01-12
|
31KB
|
827 lines
**********************************************************************
**********************************************************************
ZZZZZZZZZZ SSSSSSSS IIII M M
ZZ SS II MM MM
ZZ SS II M M M M
ZZ SS II M M M M
ZZ --------- SS II M M M M
ZZ --------- SS II M M M
ZZ SS II M M
ZZ SSS II M M
ZZZZZZZZZZZ SSSSS IIII MMM MMM
The hundred percent Z80 Emulator
Version 1.2
(C) 1990, 1992 by Jürgen Weber
Jürgen Weber
Wiesentalstr. 1
W-7170 Schwäbisch Hall
Federal Republic of Germany
**********************************************************************
**********************************************************************
IMPORTANT:
The author assumes no responsibility for the correctness of the
documentation or the function of the program. The user is advised to
test the programm fully. The risk of using the software is exclusive
to the user. The author assumes no responsibility whatever for damages
of any kind that might result from using the program.
Cited product names are [registered] trade names.
Hardware/Software preconditions:
PC/XT/AT, 1 Diskdrive (5 1/4 " recommended), 256K free memory,
MSDOS 2.1 or compatible.
Serious work is only possible with machines faster than 8 MHz 80286.
Every 10 MHz shown by the Landmark test correspond to 1 MHz of the
emulated Z80.
IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT
*********************************************************************
IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT
Be sure that you do not insert a MS-DOS disk when prompted for a CP/M
disk. The CP/M BIOS would overwrite the MS-DOS disk without
prompting. Also MS-DOS overwrites CP/M disks.
As soon as the emulator prompts for inserting a CP/M disk only use CP/M
disks. Be sure that the CP/M disk has the right format. Insert the
disk WRITE PROTECTED and display the directory. If only dots are
displayed it is a clue for a wrong format. But also if "NO FILE" is
displayed it might be a wrong format except if you are sure that the
disk is indeed empty.
IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT
*********************************************************************
IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT
INSTALLATION:
Copy the files in the package into a directory of your hard disk.
GENERAL:
ZSIM emulates a Z80 CP/M Machine (CP/M 2.2), but not the CP/M operating
system itself. In order to start CP/M, a CP/M System disk must be
inserted into drive A:, where from ZSIM boots CP/M.
The CP/M system or a compatible operating system (SUPERDOS and Z80DOS
are included in the ZSIM package) also can be put into a file
CPMSYS.CPM on the hard disk.
Every CP/M program I could test ran correctly, even the floating point
library of the public domain program SMALL-C, that requires a high
compatiblity, as it uses undocumented Z80 codes.
The complete compatibility to a CP/M machine is reached because
contrary to other emulators that emulate the operating system
themselves ZSIM only emulates the Z80 and the BIOS. On this virtual
machine runs an original CP/M compatible operating system or CP/M.
EMULATOR:
The following information only describes the specialties of the virtual
CP/M machine. For information concerning the CP/M operating system
please consult appropriate literature covering this subject.
ZSIM creates a CP/M machine with 64K ram, one disk drive and a
ramdisk. There is only one physical drive supported. The physical
drive can be set to IBM-PC drive 0 or 1 by changing the disk parameters
in the control-Break menu. The physical drive is always CP/M drive A.
The whole memory pool that is not required by MSDOS, ZSIM and the 64K
working space for the Z80, is used as ramdisk (440K ramdisk in a 640K
PC). This ramdisk can be saved in a MS-DOS File, that will be
automatically loaded when starting ZSIM next time, but only if there is
enough memory for the ramdisk. So don't use more TSRs next time. This
way you can keep important utilities in the ramdisk and have them
present every time you start ZSIM.
STARTING:
When starting ZSIM tries to load CP/M BDOS from a MS-DOS file
CPMSYS.CPM into memory. The file must be in the directory ZSIM was
started in.
The ZSIM package contains two CP/M compatible operating systems in the
files SUPERDOS.SYS and Z80DOS.SYS. Both contain the ZCPR1 command line
processor. Z80DOS is a derivative of SUPERDOS and supports date and
time (ZSIM' s BIOS furnishes time and date). But there may be write
errors if you use disks that were already written to by the original
CP/M system. This is because Z80DOS uses another faster file system.
To use one of the public domain operating systems simply copy
SUPERDOS.SYS or Z80DOS.SYS to CPMSYS.CPM:
COPY SUPERDOS.SYS CPMSYS.CPM
If you format a disk using the utility CPMFRM you can start CP/M
programs, e.g. Small-C, without having the original CP/M operating
system. Create, as described above, CPMSYS.CPM, insert a disk
formatted by CPMFRM and start ZSIM.
If CPMSYS.CPM is not present, ZSIM tries to load the system from the
boot tracks by scanning all sectors within the reserved tracks for the
Copyright message of Digital Research. If it is found DR's copyright
is displayed and the following sectors are loaded as system. A system
disk is only required for boot up, afterwards the system is kept in
memory.
For example:
Even if you would like to use the original CP/M system disk it is only
necessary to start ZSIM. Afterwards the system is kept in memory.
After successful boot from disk you can create with MOVCPM a file
containing the system (don't forget the blank between the * *) and
transfer it to MSDOS. There it is put into PUNCH.CPM. Afterwards you
should rename it to CPMSYS.CPM.
Example:
jgw 59K TPA cp/m 80 BIOS ver 1.0 -- 05/09/90 (C) 1990 by Jürgen Weber
BDOS: COPYRIGHT (C) 1979, DIGITAL RESEARCH
A>b:
B>movcpm * *
CONSTRUCTING 64k CP/M vers 2.2
READY FOR "SYSGEN" OR
"SAVE 34 CPM63.COM"
B>save 34 cpm.sys
B>pip
*up2:=cpm.sys[o]
*
For safety's sake first empty the punch buffer and delete the punch
file (in this order) to make sure the CP/M system will be put at the
beginning of PUNCH.CPM. Transfer as shown above the system. Empty the
punch buffer, start a SHELL and rename PUNCH.CPM into CPMSYS.CPM.
You can specifiy behind MOVCPM a smaller number, too. This generates a
smaller CP/M system and leaves Z80 memory behind CP/M TPA and the
system area. ZSIM automatically loads the smaller CP/M to the right
place.
The public domain operating systems SUPERDOS and Z80DOS are always
loaded by ZSIM so that BDOS is situated at 0EC00h.
DISK FORMATS:
Following CP/M disk formats are supported:
Amstrad CPC System (169K, phys. Sectors 41h-49h)
Amstrad CPC Data (178K, phys. Sectors 0C1h-0C9h)
CP/M 86 SS DD (153K)
CP/M 86 DS DD (316K)
and additionally a special format corresponding to CPC data format but
with physical sector numbers starting at 1.
The Amstrad is a Z80 Homecomputer that was quite popular in Europe in
the middle of the eighties.
The first two formats are special formats of the Amstrad CPC. The high
nibble of the sector number is used to diffentiate the formats. The
other two are used by CP/M 86 on an IBM PC and also by CCP/M 86 and DOS
Plus, that is shipped with the Amstrad PCs.
DOS Plus is compatible to CP/M 86 and PC-DOS and good for copying
between CP/M and MSDOS. An additional advantage of this format is,
that disks can be created using the MDDOS FORMAT.COM (FORMAT /8). But
before that the sector fill byte in the drive parameter table of MSDOS
must be set to 0E5h.
If you find this to be too awkward you can use the program CPMFRM.EXE.
It installs the necessary parameters and calls FORMAT.COM. If there is
the MSDOS default fill byte 0F6h in the CP/M directory CP/M sees an
entry and thinks the disk is full.
ZSIM recognizes the format of the inserted disk at every warm boot if
it is one of the five specified above. So every time you insert
another disk you should press Control-C. But this is recommended
anyway as BDOS aborts with "BDOS Error on A:RO" on any write attempt to
a disk that was not logged in with Control-C.
It is possible to edit manually the disk parameters from the Control
Break Menu and adapt them to a given manufacturer dependent format.
Also you can start ZSIM with parameter /f <diskparfile>. <diskparfile>
can be created by Control-Break menu Save Parameters. Note that single
density formats are not supported by the IBM BIOS and 8 inch disks
don't like being pressed into a 5 1/4 inch drive.
SCREEN DRIVER
The screen driver supports the CP/M Plus screen control codes.
Additionally a subset of control codes of the Amstrad CPC is
supported. For a description of the control codes see appendix 1.
Contrary to Digital Research's recommendation Bit 7 of the input ASCII
code is not zeroed.
If you enter an international character (e.g. a German umlaut) it is
translated from IBM coding into CP/M coding (e.g. ä => { ). To
display an international character set it should be switched on by ESC
2 2.
PRINTER:
Characters are sent to printer lpt0. ZSIM waits until the printer has
taken the character correctly. This can result in an infinite loop if
the printer is switched off. To prevent this there is a test for
Control-C. If it is pressed there is a warm boot. This is only
recommended in case of emergency because this way the calling program
is aborted too, of course.
PUNCH:
Digital Research specified function 6 for serving a punch. As punches
haven't great importance anymore I used functions 6 and 7 to transfer
data to MSDOS and vice versa. Characters are appended to the MSDOS
file PUNCH.CPM. It is created if it is non-existent. Characters are
buffered until the buffer buffer full. The buffer is also written out
if you hit Control-Break.
Calling function 6:
It's easiest done with PIP. But don't use the logical device PUN:
(Punch) because then PIP first sends some zero bytes. You should
either use PTP: or UP2:. If you use PTP: and transfered an ASCII file
PIP appends EOF.
PIP UP2:=ANYFILE.EXT[o]
The option [o] (object file) prevents PIPs stopping after the first
1Ah (EOF) byte while transfering a non ascii file. The option is not
necessary for transfering an ASCII file.
Remind that data are APPENDED to PUNCH.CPM.
You should proceed as fellowing:
- transfer the file with PIP as described above
- in Control-Break menu select Empty Punch Buffer
- in Control-Break menu select OS Shell and under MSDOS
renam PUNCH.CPM into the name you want:
REN PUNCH.CPM file.txt
EXIT
ENDING THE EMULATION:
The Z80 emulation can be terminated by pressing Control-Break where
after a menu pops up. You will also see this menu if the emulator
encounters the Z80 code HALT.
Warning: Hitting Control-Break only sets a flag that has to be
evaluated during the next BIOS call. That means if the Z80
is stuck in an infinite loop you have to reboot the PC.
Regularly testing the flag during the emulation would take
too much time.
In rare cases a fatal error can occur: when MSDOS loads ZSIM and its
disk buffers to an unlucky address, so that a so called DMA Boundary
Crossing is happening. Then the emulation is instantly aborted. The
emulator must be loaded to another address. Simply start a new shell
with entering COMMAND and afterwards ZSIM again.
CONTROL BREAK MENU
After pressing Control-Break the fellowing menu pops up:
+-------------------+
| Continue |
| Save Ramdisk/Quit |
| Quit |
| Save Ramdisk |
| Delete Punch File |
| Init Reader |
| OS Shell |
| Disk Parameters |
| Save Parameters |
| Load Parameters |
| Warm Boot |
| About |
+-------------------+
Use the cursor keys to select the action you wish.
ESC finishes the menu, same as Continue.
Continue continues the CP/M emulation
Save Ramdisk/Quit saves the ramdisk to the disk ZSIM was started
from and ends ZSIM.
Quit ends ZSIM without saving the ramdisk.
Save Ramdisk saves the ramdisk and continues the emulation.
This makes sense if you wish to save different
contents of the ramdisk. Important: after that
you have to start an OS Shell and rename the
saved ramdisk (RAMDISC.CPM) else it would be
overwritten if you save the ramdisk next time.
Empty Punch Buffer empties the buffer the punch writes its data to
and then writes the data onto the hard disk.
Delete Punch File deletes the MSDOS file that the punch data are
written into.
OS Shell starts a DOS Shell, but you only get 64K memory
for it. But that is enough for REN and COPY.
Disk Parameters is used for editing the CP/M disk parameters
(described below).
Save Parameters saves the disk parameters to a file. Enter
herefore a filename with extention. The parameters
are saved as hexbytes in the same order they appear
in the edit box. Before the parameters the bytes
'JW' are saved as signature.
The autologin flag is not saved.
Load Parameters loads the disk parameters from a file that was
saved with Save Parameters. Enter for loading the
filename with extention. After loading the
autologin flag is cleared and a warm boot is made.
Warm Boot has the same effect as pressing Control-C under
CP/M, but it also works if a program runs.
About tells the program name and Author.
DISK PARAMETERS
If you select Disk Parameters in the Control-Break menu you can edit
the parameters in an edit panel.
During input only valid hex digits are accepted, other characters are
ignored. ESC ends editing, changes until the line before the cursor
are valid. Use BACKSPACE to delete characters in the cursor line. An
input line must be ended with ENTER. If you press ENTER without having
entered a new value the old value is kept (like in the following
example in the lines where there is no value behind the colon).
Example:
jgw 59K TPA cp/m 80 BIOS ver 1.1 - 10/12/91 (C) 1990 by Jürgen G. Weber
BDOS: COPYRIGHT (C) 1979, DIGITAL RESEARCH
Unknown disk format. Insert new disk and press any key
+------------------+
|SPT: 0024 : 28 |
|BSH: 03 : |
|BLM: 07 : |
|EXM: 00 : |
|DSM: 00A8 : B8 |
|DRM: 003F : |
|AL0: C0 : |
|AL1: 00 : |
|CKS: 0010 : 40 |
|OFF :0002 : 3 |
| |
|DRV: 00 : |
|PTR: 28 : |
|PST: 09 : 5 |
|BPS: 02 : 3 |
|FSC: 01 : |
|LOG: FF : 0 |
+------------------+
Here I had inserted an alien disk (Osborne DD). After ZSIM had
complained about an unknown disk format I had pressed Control-Break.
Afterwards I entered the correct values.
The parameters in the upper half are standard CP/M parameters. The
others are an extention by me and mean the following:
DRV: physical number of the drive with the CP/M disk (0 or 1);
but this is always drive A: within CP/M
PTR: physical track number, 40 with a 360K drive, else (with 720K,
1.2 MB or 1.4 MB) up to 80 tracks
PST: number of physical sectors per track, 9 with 360K drives
BPS: physical sector length; BPS=log2(SecLen in bytes )-7; this value
is required by the disk controller
FSC: physical number of first sector of track, usually 1
LOG: FF=autologin, 0=no autologin
If you change the parameters set LOG to 0, else the next autologin
would change the parameters again.
To get standard parameters, set LOG to FF, insert a disk with normal
format and press Control-C. But a secure format adaption only is
possible with single sided formats. Some two sided formats address the
second side as extention of the tracks of the first side (with the
effect of more sectors per track), others double the track count.
ZSIMs BIOS uses the method of CP/M 86 double sided (double sector count
and track translation).
EMULATION OF THE Z80
The emulated machine is almost as complete as a real Z80 CP/M machine.
All emulated Z80 instructions that change or use flags where tested
(especially how they influence flags). All defined flags are
influenced exactly as on an original Z80 chip.
I tested this by looping the register pair HL from 0 to FFFFh and
copying it with PUSH HL - POP AF to AF, executing the instruction to
test and adding the resulting AF register pair to a check sum.
I improved the emulation until all flag influencing instructions
resulted the same checksum on the Z80 and on the emulation. The Z80
flags that are not defined by Zilog and show more or less random
behaviour are not defined within ZSIM either. But different undefined
flag status may result. ZSIM supports non-documented Z80 instructions,
the so called illegal opcodes.
All CP/M programs I tested run with ZSIM as on a CP/M machine, even the
floating point package of the Small-C compiler that uses undocumented
Z80 instructions.
A preeminent difference between emulation and original Z80 chip is the
execution time. There is no proportinal relation between the cylcles
an operation takes on the emulation and the cycles needed on a Z80. So
you cannot realise time critical applications like cassette storing
routines with ZSIM.
A Z80 uses the R register for refreshing dynamic rams and continually
increments it. Some programmers used this on a Z80 as random number
generator. So ZSIM loads it with "random" values derived from the
system time.
Port operations do not execute port accesses, as input you get 0FFh.
The flags are set and port operations with block repeat change the
count registers accordingly. You can change all this in module PORTIO.
Some Tests of the speed of the emulation:
I used the fellowing benchmarks:
1) Compile the programm TEST.C included with Ron Cain's Small-C
Compiler.
The executable TEST.COM is very hard to emulate as its floating
point routines use undocumented Z80 ops. Contrary to all other
emulators I know, ZSIM emulates these operations correctly and
TEST.COM works.
2) Compiling MC.PAS (on the Turbo disk) with TURBO PASCAL 3.0 on
disk.
3) Compiling LISTER.PAS (on the Turbo disk) with TURBO PASCAL 3.0 in
memory.
4) Enter a short assembler loop with the debugger and execute it:
LD B,20
L1: LD HL,0
L2: INC HL
LD A,H
OR L
JP NZ,L2
DJNZ L1
5) let DDT dump a range of memory:
D0,8000
RESULTS (on a 16 MHz 386 SX), Z80 Tests were run on an Amstrad
CPC, Z80 A, 4 MHz:
TestNr ZSIM:Z80 CPC/Z80 ZSIM
1 0,85 3.37.00 3.04.00
2 0,88 1.20.00 1.10.00
3 0,99 0.03.65 0.03.63
4 1,37 0.17.10 0.23.45
5 0,41 4.06.00 1.40.00
Nr. 4 is the test that says most about emulation speed because here
only calculation time without BIOS overhead is measured. Test Nr. 1
strains the disk drive as compiling, assembling and linking are made on
disk. The huge disk buffers of ZSIM greatly speed this up. Test Nr.
4 is similar to test 1.
Test Nr 3 should give a similar result as Nr. 4, but Turbo Pascal
continually displays the line it compiles therefore the slow screen
output of the CPC takes time.
In test Nr 5 screen output is the bottle neck, where the CPC with its
text output in graphic mode has no chance against the screen output of
an 80386.
Appendix 1
==========
Implemented screen control sequences:
CPC
ASCII Operation
2 cursor off
3 cursor on
7 Bell
8 Cursor left
9 Cursor right
10 Cursor down
11 Cursor up
12 clear screen
13 Cursor to beginning of line
16 delete char under cursor
17 delete line to cursor
18 delete line from cursor
19 delete screen to cursor
20 delete screen from cursor
24 toggle highlight
30 cursor home
31 x y cursor column x,line y (home = 1,1 )
CP/M Plus:
ESC @ Init Screen: CLS,HOME,highlight off, cursor on,
underline off, US char set
ESC 2 x select country character set:
x country:
0 USA
1 France
2 Germany
3 Britain
4 Denmark
5 Sweden
6 Italy
7 Spain
ESC A cursor up
ESC B cursor down
ESC C cursor right
ESC D cursor left
ESC E clear screen, cursor keeps position
ESC H cursor home
ESC I cursor up, scroll if necessary
ESC J clear screen from cursor
ESC K delete line from cursor
ESC L insert line
ESC M delete line
ESC N delete char below cursor
ESC Y y x cursor to column x,line y, Home = 32,32
ESC d delete line to cursor
ESC e cursor on
ESC f cursor off
ESC j store cursor position
ESC k get stored cursor position
ESC o delete line to cursor
ESC p highlight on
ESC q highlight off
ESC r underline on
ESC s blinking on
ESC t blinking off
ESC u underline off
Appendix 2
==========
Technical description of the implemented CP/M 80 BIOS.
Every BIOS routine is called by executing a pseudo Z80 CALLN opcode
(EDED) with BIOS number as following byte.
description of the calls:
0 Cold boot
Loads BDOS from MS-DOS file CPMSYS.CPM into memory and installs BIOS jp
table and disk parameters in Z80 ram. Drive A: is selected,
IO-Byte and punch buffer cleared and control passed to BIOS routine
warm boot.
If CPMSYS.CPM does not exist, boot tries to load BDOS from the system
tracks. ZSIM searches all reserved tracks (<OFF) for the copyright
message of Digital Reasearch. If found the following sectors are
loaded as BDOS.
If this was successful you can create with MOVCPM a file that contains
the BDOS. This file must be transfered to the MS-DOS Start Disk of
ZSIM and be renamed to CPMSYS.CPM.
1 Warm boot
Copy the BDOS that was loaded by function 0 into memory to its correct
position in the Z80 memory area. ZSIM takes the correct address
specified by MOVCPM. Afterwards it is tested if the disk has a known
format. If known the right disk parameters are created. Now the Z80
simulator is started and CP/M CCP called.
2 Console Status
return 0FFh in A if there is a char ready on keyboard.
3 Console Input
return ASCII code from keyboard in A.
Contrary to suggested by Digital Research Bit 7 is not cleared. If an
international character (e.g. German Umlaut) is input it is
transformed from IBM code into CP/M code (e.g. ä => { ).
International character sets are only displayed if switched on with ESC
2 x.
Extended PC keys: If in CONIO.ASM the constant WS_KEY is set to TRUE,
the cursor keys, Ins, Del, Home, End, PgUp and PgDn are converted to
WordStar control sequences (^Q... ). The following call of CONIN
returns ^Q and the next the corresponding Code.
4 Console Output
Displays char in C on screen. Control sequences are evaluated as
described in appendix 1.
5 List Character
Copies char in C to printer lpt0. Waits until the printer has accepted
the char correctly. This would result in an infinite loop is there is
no printer. Therefore the function tests for Control-C. If pressed, a
jump to Z80 address 0 folllows. There is normally a jump to warm boot.
6 Punch Character
Digital Research provided this function for serving a punch. As
punches/readers aren't of overwhelming importance anymore I used this
function to transfer data to MS-DOS. Characters transferred to this
function are appended to the MS-DOS file PUNCH.CPM. If it does not
exist it is created.
The characters are buffered and written out, if buffer is full. This
buffer is also written out if the Control-Break menu pops up.
7 Read Character
Reads characters from MS-DOS file READER.CPM. This only works with
files that don't contain CPM_EOF (26). The PIP option [o] does not
help as there is no way to signal PIP the actual end of file and PIP
gets stuck in an infinite loop.
If READER.CPM does not exist or is read to end, CPM_EOF (26) is
returned.
To diffentiate EOF from a 26 byte in a binary file this function
additionally returns at the end of READER.CPM -1 (0ffffh) in HL else
H=0, L=char. This is not provided by DR and is not interpreted by
standard programs especially not by PIP!
The following assembler lines return the character read in L or -1
in HL:
LD HL,(1)
LD DE,6*3 ; BIOS READER, RETURN IN HL OR -1 IF ERROR
ADD HL,DE
JP (HL) ;
After transfering a file you should execute Init Reader in Control
Break menu.
Example:
PIP B:ANYFILE.TXT=RDR:
8 Home
Should return the read/write heads of the drive to track 0, but is not
executed for speed reasons. Only set track with parameter 0 is called.
9 Selekt Disk
Selects the Drive given in register C and returns if the drive exists
in register HL conatins a pointer of its DPH else 0. There are only
the physical drive A: and the ramdisk b:
10 Set Track
In register C.
11 Set Sector
In register C.
12 Set DMA
Register BC contains Data transfer buffer address.
13 Read Sector
Reads the sector selected by functions 9,10,10. Reading from ramdisk
is quite easy. Reading from disk is more difficult and for reasons of
speed the directory track and one data track are buffered in ram.
First must be decided if the sector is already in buffer. If not the
track first must be read from disk. Afterwards the correct address in
buffer must be calculated.
14 Write Sector
Writes the sector selected by functions 9,10,10. Writing to ramdisk is
quite easy. Writing to disk is more difficult as for reasons of speed
the directory track and one data track are buffered in ram. If the
sector is in the directory track the sector is written out immediately
for security reasons. Otherwise the sector is buffered in ram. It is
save enough only to write out the directory track immediately as after
changing a file the directory is updated which results in writing out
the directory track and the data track.
15 List Status
Signals if the printer is ready to receive (A=1 = ready).
16 Sector Translation
Some CP/M systems make a logical sector translation for the skew
factor. This is done by function 16.
26 read/set time and date
This function is a supplement not provided in the CP/M 80 BIOS. It
works like in CP/M Plus. It is also supported by the public domain
BDOS Z80DOS. To use it in the source of Z80DOS the entry address of
time must be set:
BIOStim equ BIOS+4EH
Writing of date and time (c=0FFh) is not supported in order not to
change the real time clock of the PC.
A call with C=0 reads the time and returns a pointer in HL to the
following structure:
dw @date ; full days since Jan, 1st, 1978
db @hour ; hours in BCD format
db @min ; minutes in BCD format
db @sec ; seconds in BCD format
End of ZSIM.DOC