home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / misc / 1033 < prev    next >
Encoding:
Internet Message Format  |  1993-01-02  |  2.2 KB

  1. Path: 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
  2. From: cmcmanis@pepper.Eng.Sun.COM (Chuck McManis)
  3. Newsgroups: comp.sys.misc
  4. Subject: 64180 question...
  5. Date: 3 Jan 1993 00:34:57 GMT
  6. Organization: Sun Microsystems Inc., Mountain View, CA
  7. Lines: 53
  8. Message-ID: <lkcd5hINNar2@exodus.Eng.Sun.COM>
  9. NNTP-Posting-Host: pepper
  10. Keywords: internal IO
  11.  
  12. So this ones driving me a bit batty. I've got a single board computer
  13. based on the 64180 chip (Vitrax IX to be precise) which has a built
  14. in BASIC interpreter (buggy and slow) but a mechanism for calling
  15. machine language functions (primitive but usable). To be honest I'm
  16. not a 64180 hacker but know Z80 code quite well. So I put a machine
  17. language function into RAM that is supposed to output a character to
  18. the ASCI port that looks like this :
  19.     PUSH BC
  20.     PUSH AF
  21.     LD    A,64    ; Set up the ASCI
  22.     OUT    0
  23.     LD    A,2
  24.     OUT    2
  25.     LD    B,10
  26.     LD    E,30    ; "&" character
  27. LOOP:    IN    4    ; Read the status port
  28.     AND    2    ; And it with TDRE
  29.     JR    Z,LOOP    ; Loop if it isn't empty
  30.     LD    A,E    ; Get current character
  31.     OUT    6    ; Send it out
  32.     INC    E    ; Add 1 to E
  33.     DEC    B    ; Subtract one from B
  34.     JR    NZ,LOOP    ; Loop if not done
  35.     POP    AF
  36.     POP    BC
  37.     RET
  38.  
  39. Pretty simple, should just send 16 characters to the serial port and
  40. then it returns. NOT. 
  41.  
  42. Now the weird part is that if I use the "OUT 6,48" statement in BASIC
  43. it works fine, out comes the character. If I change the OUT 6 in the
  44. code to an OUT C0 (which is a parallel port hooked up to some LEDs) the
  45. LEDs all change. Now the rest of the I/O space from 40H - FFH is decoded
  46. so I don't believe the internal registers have been relocated, unless
  47. the 64180 has a new 16 bit I/O address range that I'm missing.
  48.  
  49. So the questions are :
  50.     1) Is there any I/O instructions that are specific to the
  51.        64180 (Z180) that I'm missing here?
  52.     2) How can I figure out where the "IO" block is?
  53.     3) What is a good 64180 reference? I've got Hitachi
  54.        sending me something (could be just the data sheet
  55.        though)
  56.  
  57. --Chuck
  58.  
  59. Pls reply to me direct thanks.
  60.  
  61. --
  62. --Chuck McManis                Mr. NIS+                Sunsoft
  63. uucp: {anywhere}!sun!cmcmanis   BIX: <none>   Internet: cmcmanis@Eng.Sun.COM
  64. These opinions are my own and no one elses, but you knew that didn't you.
  65.