🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.m68k.pc
Article #200

Re: help cpm 68k

#200
From: Jim Cathey
Date: Mon, 02 May 1988 21:11
46 lines
2915 bytes
In article <4607@batcomputer.tn.cornell.edu> wilker@TCGOULD.TN.CORNELL.EDU (Clarence W. Wilkerson Jr.) writes:
>
>In article <4116@latcs1.oz>, ray@latcs1.OZ.AU (Douglas Ray) writes:
>>
>>A group of us have been asked to write an emulator for the 68000.  It
>>requires minimal character/string io, and for the sake of
>>standardisation we were asked to use CP/M 68k calling conventions.
>>Anyone got any CP/M 68k documentation?
		-douglas ray (ray@latcs1.oz) (LaTrobe CompSci)
>
>There are calls #9 (print a string terminated by $) and 10 ( read
>into a buffer. The first byte is max length of input string, the
>second is actual length, followed by characters input. A ^J or ^M
>terminates the input ( bu t I think is not stored in the string.)
> However, I don't know how parameters are passed in CPM-68k. As near
> as I can tell from looking a a Dr. Dobbs article on a 8080 emulator
> under CPM68k, one loads long addresses into d1, and the function
> number into d0, and then calls bdos (listed as $4e42 )

You got it!  By the way, 'bdos' was my macro for trap #2, and 'bios'
was for trap #3 which was cp/m-68k's way of calling the OS.  The name
binding should be obvious.  For documentation, you can just use the cp/m
2.2 (8080) manuals.  Now isn't _that_ special?  Function code in D0.W,
parameter in D1.L.  Returns values in D0.W.  By the way, don't use the
bios trap is the official word.  Bdos call #59 (?) is a direct bios
call.  The bios trap is not guaranteed to preserve any registers.  The
only reason I mention it is that you can't do simple key-driven I/O (no
echoing or control-c trapping) via the bdos calls -- you have to go to
the bios.  There are several functions (including this one) that need
D1 pointing to a special buffer.  If you really need the real poop I
can try to unbury my manual.

The cp/m calls are disgusting enough that I don't see any reason to
perpetuate their idiot-syncracies any further.  Just conjure up a set
of your own functions and use one of the traps to invoke them.  You'll
be glad you did.

+----------------+
! II      CCCCCC !  Jim Cathey
! II  SSSSCC     !  ISC Systems Corp.
! II      CC     !  TAF-C8;  Spokane, WA  99220
! IISSSS  CC     !  UUCP: uunet!iscuva!jimc
! II      CCCCCC !  (509) 927-5757
+----------------+
			"With excitement like this, who is needing enemas?"
Technical Details
Message-ID: <1435@iscuva.ISCS.COM>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!ll-xn!ames!pasteur!ucbvax!iscuva.iscs.COM!jimc
References: <4116@latcs1.oz> <4607@batcomputer.tn.cornell.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!ll-xn!ames!pasteur!ucbvax!iscuva.iscs.COM!jimc
From: jimc@iscuva.iscs.COM (Jim Cathey)
Newsgroups: comp.sys.m68k.pc
Subject: Re: help cpm 68k
Message-ID: <1435@iscuva.ISCS.COM>
Date: 2 May 88 21:11:26 GMT
References: <4116@latcs1.oz> <4607@batcomputer.tn.cornell.edu>
Sender: mwm@ucbvax.BERKELEY.EDU
Organization: ISC Systems Corporation, Spokane, WA
Lines: 46
Keywords: Fn nos, calling conventions
Approved: info-68k@ucbvax.berkeley.edu