This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
On Mon, 12 Oct 1998, Dony wrote: > The equivalent MRI directives in GAS : > MRI | GAS > ------------------------------------------ > DS.B | .comm label,1 > DS.W | .comm label,2 > DS.L | .comm label,4 I thought of this but had to drop it. Unfortunately, I need 'label' to be placed *in the current section,* and not in the BSS section. According to further out into the same gas documentation you included below, both the '.comm' and '.lcomm' directives will place 'label' into the BSS section. Guess I could hack the current section into becoming a/the BSS section, but that kind of defeats the point. So, the prior suggestion of using 'label: .space 1/2/4*n' seems like my best and most transparent option. The downside of this is that I do not get any type checking of my code. Not that I am all that certain the Motorola assembler does that either. > GAS use MIT syntax which is slightly different from Motorola syntax. According to the documetation - which you where kind enough to include below - gas can interpret both version interchangeabely. I personally prefer Motorola syntax, both with the intervening periods "." and the address mode notation. But the issue is what syntax the MRI assembler use. My testing revails that it does at least accept Motorola syntax. It renders standard gas directives illegal and reimplent among others the 'DS.B/W/L' motorola directive. This is the main reason I would like to use this compatibility mode - at least for parts of my porting effort. (I.e. NO porting effort.) But in the meantime I have discovered what went wrong. All my two-operands opcodes failed while single-operand opcodes passed. It appears that the MRI compiler does not accept whitespace between the operands. Thus, the following code is perfectly legal m68k-coff-as assembly code: .mri 1 DELETE equ 8 LINE_BUF ds.b 64 lea.l DELETE,A1 clr.w LINE_BUF(A2) move.l (A2),D1 move.l 255(A1,D1),D2 move.l $FFFF(PC),D3 And by that, I am close to all set. The remaining two problems is that gas does not accept '.mri 0' to *leave* MRI compatible mode, eventhough it should according to the documentation. But EOF does the same thing so this shortcoming/bug I can live with. The other is that the documentation spesifically reserve against the MRI 'ORG' directive. That means rearranging the source code. But still, thank you all for the effort. > with the Sun assembler. Intervening periods are > ignored; for example, `movel' is ***equivalent*** to `move.l'. > Absolute > `symbol', or `digits', optionally followed by `:b', `:w', or `:l'. This one looks promising but I am not certain on how to use it. > The immediate character is `#' for Sun compatibility. > The line-comment character is `|' Unless in MRI compatibility mode, where the usual Motorola style '*' is used as a line-comment character. -- ****************************************************** Never ever underestimate the power of human stupidity. -Robert Anson Heinlein GeirFRS@invalid.ed.ntnu.no ****************************************************** ________________________________________________ To get help for the crossgcc list, send mail to crossgcc-request@cygnus.com with the text 'help' (without the quotes) in the body of the message.