DataMuseum.dk

Presents historical artifacts from the history of:

CP/M

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about CP/M

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦88b08b151⟧ TextFile

    Length: 896 (0x380)
    Types: TextFile
    Names: »XBDOS.SRC«

Derivation

└─⟦8dcf1351b⟧ Bits:30004118/disk2.imd SW1720/I5 Pascal/MT+ Release 5.5
    └─⟦this⟧ »XBDOS.SRC« 

TextFile

(* 5.5 *)
MODULE BDOSFUNC;

(*$M @BDOS*)
(*$M @DFLT*)
(*$M **)


EXTERNAL PROCEDURE @IOERR(CPMFUNCNUM:INTEGER);

FUNCTION @BDOS(FUNC:INTEGER; PARM:WORD):INTEGER;
CONST
  CPMENTRYPOINT = 5;
VAR
  RESULT : INTEGER;
BEGIN

   INLINE( "LHLD / FUNC /
	   "MOV C,L /
	   "LHLD / PARM /
	   "XCHG /
	   "CALL / CPMENTRYPOINT /
	   "MOV L,A /
	   "MVI H / 0 /
	   "SHLD / RESULT );

  @BDOS := RESULT;
  IF FUNC < 15 THEN
    EXIT;
  IF FUNC = 26 THEN
    EXIT;
  IF (FUNC=15) OR (FUNC=16) OR (FUNC=22) THEN
    BEGIN
      IF RESULT = 255 THEN
        @IOERR(FUNC)
    END
  ELSE
    IF (FUNC = 21) THEN
      IF RESULT <> 0 THEN
         @IOERR(FUNC);
END;

PROCEDURE @DFLT;
VAR
  I : INTEGER;
BEGIN
  I := @BDOS(26,WRD($80));	(* DEFAULT DMA ADDRESS *)
END;


MODEND.

«eof»