01 January 2016, 17:58 | #1 |
Posts: n/a
|
GNU GAS Immediate data misbehaving
Hello all,
when I use older 68K Assemblers this is fine: Code:
move.L #'Hello!',(a3) Cheers, Minty. |
01 January 2016, 19:15 | #2 | |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 56
Posts: 2,046
|
Quote:
You can use Code:
move.l #'Hell',(a3) move.w #"o!", 4(A3) |
|
01 January 2016, 19:19 | #3 | |
Posts: n/a
|
Quote:
for the general form of: Code:
move.B #'A',d1 |
|
01 January 2016, 20:18 | #4 |
Registered User
Join Date: Jul 2009
Location: Lala Land
Posts: 608
|
|
01 January 2016, 20:56 | #5 |
Posts: n/a
|
Sorry, guys - it has been a long day and I messed things up.
This works fine: Code:
move.B #'AB',d1 Code:
move.B #"AB",d1 Code:
Error: syntax error -- statement 'move.b #"AB",d1' ignored Cheers. |
01 January 2016, 21:08 | #6 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,545
|
|
01 January 2016, 21:49 | #7 |
Posts: n/a
|
|
01 January 2016, 23:34 | #8 | |
Posts: n/a
|
Quote:
For this: Code:
move.l #'Hell',(a3) Code:
Error: syntax error -- statement 'move.l #72e1144(a3)' ignored |
|
01 January 2016, 23:46 | #9 |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 722
|
Replace # with $
(source http://stackoverflow.com/questions/3...eplace-numbers ) |
02 January 2016, 00:11 | #10 | |
Posts: n/a
|
Quote:
I get now: Code:
move.W $'A',(a3) undefined reference to '$65' This is odd that. I am using these GAS switches: AS_FLAGS:= -D -R -mcpu=68000 --bitwise-or --traditional-format --register-prefix-optional --statistics -I $(SRC) The switches in red are 68K GAS specific. |
|
02 January 2016, 01:58 | #11 |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 722
|
Well, this works
Code:
.text .even .globl _foo _foo: movel #('H'<<24|'E'<<16|'L'<<8|'L'),d0 rts Code:
#include <stdio.h> int foo(void); int main(int argc, char **argv) { char buf[5]; buf[4]='\0'; int i = foo(); strncpy(buf, (char *)&i, 4); printf("%s\n",buf); printf("%X\n",i); return 0; } m68k-amigaos-gcc -o tas t.c t.s -Wa,--bitwise-or |
02 January 2016, 11:04 | #12 | |
Posts: n/a
|
Quote:
I find it impossible to believe that GNU GAS does not permit string literals, for a start it would mean that much of the older 68K code assembled with Assemblers of the day which did permit it would not assemble with GAS. I may end up having to look in the GAS src at this rate. Thanks for trying that out, Alkis. Last edited by MintyTheCat; 02 January 2016 at 11:40. |
|
02 January 2016, 18:59 | #13 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,545
|
Quote:
May I ask what you want to achieve? There are dozens of really good assemblers on the Amiga. Nobody would deliberately use gas for program development. |
|
03 January 2016, 10:58 | #14 | |
Posts: n/a
|
Quote:
I seem to have found a bug in this version of GAS. I will be looking into this further. I have used GAS for many projects now. My main concern is that I want the flexibility of GAS and the Binutils and I want to know that my toolchain will be supported into the future. |
|
03 January 2016, 16:01 | #15 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,545
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Tool to convert asm to gnu asm (gas) | Asman | Coders. Asm / Hardware | 13 | 30 December 2020 11:57 |
Preparing a CF from GNU/Linux | iddqd | support.FS-UAE | 1 | 21 June 2015 10:09 |
Auto-config of games in DB misbehaving | TenLeftFingers | support.FS-UAE | 4 | 13 March 2014 15:11 |
OS3.9 Gnu C Compiler Environment help | Morbane | Coders. General | 0 | 06 January 2012 08:35 |
Misbehaving CD32 - Odd Problems | Fingerlickin_B | support.Hardware | 39 | 28 January 2010 19:20 |
|
|