home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / misc / 1004 < prev    next >
Encoding:
Internet Message Format  |  1993-01-05  |  2.2 KB

  1. Xref: sparky comp.os.misc:1004 comp.os.vms:20381 comp.os.rsts:91 vmsnet.pdp-11:917
  2. Newsgroups: comp.os.misc,comp.os.vms,comp.os.rsts,vmsnet.pdp-11
  3. Path: sparky!uunet!psinntp!ficc!peter
  4. From: peter@ferranti.com (peter da silva)
  5. Subject: Re: Help on RT-11 macro language
  6. Message-ID: <id.U6GW.CIK@ferranti.com>
  7. Followup-To: comp.os.misc,comp.os.rsts,vmsnet.pdp-11
  8. Keywords: RT-11, macro
  9. Organization: Xenix Support, FICC
  10. References: <93Jan04.223305.29354@acs.ucalgary.ca>
  11. Date: Tue, 5 Jan 1993 17:45:15 GMT
  12. Lines: 57
  13.  
  14. PDP-11 hackers hang around on comp.os.rsts and vmsnet.pdp-11. I've directed
  15. followups there...
  16.  
  17. In article <93Jan04.223305.29354@acs.ucalgary.ca> morrow@cns.ucalgary.ca (Bill Morrow) writes:
  18. > I'm a bit confused by the unconditional branch instruction -
  19. > where does this code end up after the 'BR 10$+2' step?
  20.  
  21. All of the following assumes I'm not psychotic:
  22.  
  23. Two bytes after the label marked "10$".
  24.  
  25. Assume .=1000 (octal)
  26.  
  27. Address    Data          Code
  28. 1000    0        > DR3INT: 0
  29. 1002    <branch>    >     BR    10$+2        <--- branch to where ?
  30. 1004    <branch>    >     BR    20$+2
  31. 1006    <mov>        > 10$:    MOV    #107,DMACSR
  32.     107
  33.     DMACSR
  34. 1014    <tst>        >     TST    ADCO        <--- here ?
  35.     ADCO
  36. 1020    <branch>    >     BEQ    11$
  37. 1022    <mov>        >     MOV    #113,KWREG
  38.     113
  39.     KWREG
  40. 1030    <mov>        > 11$:    MOV    DR3INT+4,DR3INT
  41.     DR3INT+4
  42.     DR3INT
  43. 1036            >     TR            <--- or here ?
  44.             > 12$:    et cetera ad nauseum
  45.  
  46. Since the MOV is a three-word instruction, it's branching into the middle
  47. of the move instruction. Are you sure this isn't some sort of table being
  48. interpreted as code?
  49.  
  50. > My intuitive guess is that it ends up at 'TST ADCO',
  51. > but the manual seems to be telling me it branches to
  52. > the indicated address.
  53.  
  54. I don't see how.
  55.  
  56. > While you're here, does the 'MOV' instruction at 11$ really move
  57. > the label 'DR3INT' to the same address as 10$?
  58.  
  59. No, it moves the BR 20$+1 *instruction* to DR3INT. DEC's assemblers all
  60. use "MOV <src>,<dst>".
  61.  
  62. > What does 'TR' do? I can't find it in the instruction set
  63. > or the macro language reference manual.
  64.  
  65. I don't know offhand. Maybe a macro.
  66. -- 
  67. Peter da Silva                                            `-_-'
  68. Ferranti International Controls Corporation                'U` 
  69. Sugar Land, TX  77487-5012 USA
  70. +1 713 274 5180                            "Zure otsoa besarkatu al duzu gaur?"
  71.