Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!apple!vsi1!daver!bungi.com!news From: ian@sibyl.eleceng.ua.oz.au Newsgroups: comp.sys.nsc.32k Subject: Monitor questions Message-ID: <9005081634.2213@munnari.oz.au> Date: 8 May 90 06:32:27 GMT Sender: news@daver.bungi.com Lines: 22 Approved: news@daver.bungi.com Well, I have just been trying to compile Bruce's monitor using gcc/gas/gld. Not too bad. I have written a sed script to convert between Bruce's assembler syntax and gas. This is not too hard because the addressing modes syntax is the same. I have a couple of questions about the semantics of the pseudo-ops though. What does ".program" and ".static" do? I have assumed they are the same as ".text" and ".data" is that right? Gnu ld does not define _bdata. I am currently linking in a little assembler first.s which defines _bdata to be the pc for the bottom of the .data section. Does that sound right? Bruce uses a -D option for your linker. The GNU ld also takes a -D option but I suspect the semantics are different. The GNU loader used -Tdata to specify the starting address of the data section and -D specifies the *size* of the data section. I *think* -Tdata is the one to use. One thing I don't understand is what use a .data section is in the context of a rom monitor. RAM will be uninitialized and ROM is unalterable. Constant data can be put in the .text segment (and end up in ROM) and any non constant data will have to be initialized and might as well be in the .bss segment.