Article View: comp.sys.misc
Article #70664180 question...
From: Chuck McManis
Date: Sun, 03 Jan 1993 00:34
Date: Sun, 03 Jan 1993 00:34
53 lines
2357 bytes
2357 bytes
So this ones driving me a bit batty. I've got a single board computer
based on the 64180 chip (Vitrax IX to be precise) which has a built
in BASIC interpreter (buggy and slow) but a mechanism for calling
machine language functions (primitive but usable). To be honest I'm
not a 64180 hacker but know Z80 code quite well. So I put a machine
language function into RAM that is supposed to output a character to
the ASCI port that looks like this :
PUSH BC
PUSH AF
LD A,64 ; Set up the ASCI
OUT 0
LD A,2
OUT 2
LD B,10
LD E,30 ; "&" character
LOOP: IN 4 ; Read the status port
AND 2 ; And it with TDRE
JR Z,LOOP ; Loop if it isn't empty
LD A,E ; Get current character
OUT 6 ; Send it out
INC E ; Add 1 to E
DEC B ; Subtract one from B
JR NZ,LOOP ; Loop if not done
POP AF
POP BC
RET
Pretty simple, should just send 16 characters to the serial port and
then it returns. NOT.
Now the weird part is that if I use the "OUT 6,48" statement in BASIC
it works fine, out comes the character. If I change the OUT 6 in the
code to an OUT C0 (which is a parallel port hooked up to some LEDs) the
LEDs all change. Now the rest of the I/O space from 40H - FFH is decoded
so I don't believe the internal registers have been relocated, unless
the 64180 has a new 16 bit I/O address range that I'm missing.
So the questions are :
1) Is there any I/O instructions that are specific to the
64180 (Z180) that I'm missing here?
2) How can I figure out where the "IO" block is?
3) What is a good 64180 reference? I've got Hitachi
sending me something (could be just the data sheet
though)
--Chuck
Pls reply to me direct thanks.
--
--Chuck McManis Mr. NIS+ Sunsoft
uucp: {anywhere}!sun!cmcmanis BIX: <none> Internet: cmcmanis@Eng.Sun.COM
These opinions are my own and no one elses, but you knew that didn't you.
Technical Details
Message-ID:
<lkcd5hINNar2@exodus.Eng.Sun.COM>Path:
arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!howland.reston.ans.net!wupost!cs.utexas.edu!sun-barr!male.EBay.Sun.COM!exodus.Eng.Sun.COM!pepper.Eng.Sun.COM!cmcmanisShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!howland.reston.ans.net!wupost!cs.utexas.edu!sun-barr!male.EBay.Sun.COM!exodus.Eng.Sun.COM!pepper.Eng.Sun.COM!cmcmanis From: cmcmanis@pepper.Eng.Sun.COM (Chuck McManis) Newsgroups: comp.sys.misc Subject: 64180 question... Date: 3 Jan 1993 00:34:57 GMT Organization: Sun Microsystems Inc., Mountain View, CA Lines: 53 Message-ID: <lkcd5hINNar2@exodus.Eng.Sun.COM> NNTP-Posting-Host: pepper Keywords: internal IO