home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.os.misc:1002 comp.os.vms:20358
- Newsgroups: comp.os.misc,comp.os.vms
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!asuvax!ncar!uchinews!rover.uchicago.edu!frank
- From: frank@rover.uchicago.edu (Frank - Hardware Hacker - Borger)
- Subject: Re: Help on RT-11 macro language
- Message-ID: <5JAN199310241704@rover.uchicago.edu>
- News-Software: VAX/VMS VNEWS 1.41
- Keywords: RT-11, macro
- Sender: news@uchinews.uchicago.edu (News System)
- Reply-To: frank@rover.uchicago.edu
- Organization: Joint Center for Radiation Therapy
- References: <93Jan04.223305.29354@acs.ucalgary.ca>
- Date: Tue, 5 Jan 1993 16:24:00 GMT
- Lines: 62
-
- In article <93Jan04.223305.29354@acs.ucalgary.ca>, morrow@cns.ucalgary.ca (Bill Morrow) writes...
- >Hello all you old fellows,
- > (plea for help here)
-
- >DR3INT: 0
-
- from the naming convention, this looks like the entry point for
- an ISR (Interrupt service routine.) It gets filled in later on by
- code which moves one of the following 2 instructions into the
- location DRINT3: n.b. this means that the code never executes the
- following 2 instructions AT THEIR CURRENT LOCATION
-
- > BR 10$+2 <--- branch to where ?
- > BR 20$+2
-
- One must know that a branch instruction contains the branch code in
- the upper byte, plus a word offset in the lower byte. To get the new
- pc, you do the following:
-
- 1/ Take the absolute address of the branch instruction.
- 2/ Add 2, (because the pc is 2 higher after reading the instruction.
- 3/ Add 2 times the value of the lower byte.
-
- So as a result, the BR 10$+2 instruction, WHEN MOVED 2 bytes further
- upstream, will branch to location 10$. (Catch on? The +2 is added to
- the branch instruction 2 make up for the fact that the instruction
- is being moved, but the assembler doesn't know it.)
-
- >10$: MOV #107,DMACSR
- > TST ADCO <--- here ?
- > BEQ 11$
- > MOV #113,KWREG
- >11$: MOV DR3INT+4,DR3INT
- > TR <--- or here ?
- >12$: et cetera ad nauseum
- >
- One other point, because we are moving DRINT+4 to DR3INT, the
- final adjustment+4, -2 is off by 2, so the BR 20$+2 will eventually
-
- >While you're here, does the 'MOV' instruction at 11$ really move
- >the label 'DR3INT' to the same address as 10$? Why is the
- >'BR 20$+2' there then?
-
- MOVs are simple. MOVE DR3INT+4 moves the CONTENTS of
- location DR3INT+4
-
- MOV #nnn moves a number nnn to xxx
-
- >
- >What does 'TR' do? I can't find it in the instruction set
- >or the macro language reference manual.
-
- There should be code in the start of the source stating items
- of the form .MACRO TR.
-
- Check your manual and you should be able to do a compile with
- the listing expanding the macro, so you see what it actually does.
- Frank R. Borger - Physicist __ Internet: Frank@rover.uchicago.edu
- Michael Reese - Univ. of Chicago |___ Phone : 312-791-8075 fax : 567-7455
- Center for Radiation Therapy | |_) _
- | \|_) By the time we've made it, we've
- "Birthplace of Softball" |_) had it. - Malcom Forbes
-