Welcome, Guest. Please login or register.

Author Topic: Assembler (68k) help (about dc pseudo op)  (Read 25936 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Assembler (68k) help (about dc pseudo op)
« on: January 13, 2003, 03:09:46 PM »
I got tired and started reading an assembler tutorial I found on Aminet here. You know, that's where the fun really begins! :-D  I regret not having done that sooner.
I URGE EVERYONE IN HERE TO START PROGRAMMING :-D

Anyway, either I'm too dumb, or the tutorial is not that well written cause I'm not understanding the dc pseudo operation.
The tutorial is old and assumes that you're using AssemPro.

Anyway my doubt is:
It's said in there that in most cases an address like $1000 (for example) won't be used cause you use a label that point to a cetain address instead.
Something like: move #1,$1000
would, more commonly be written like:
...
move #1,marker
...
marker:dc.w 1

The last instruction is a pseudo instruction for the assembler and defines the marker label.
BUT SHOULDN'T IT BE LIKE:
marker:dc.w $1000
!!!!!!!!!

Another doubt:
after reading the various types of addressing I don't get it what this type could be: #$1234678 (example)
it should be direct addressing (cause it uses a #) but why then in the other examples of this type of addressing they don't use  an hexadecimal number in none of them(I suppose it doesn't matter then)?

Yet another doubt:
So maybe this is what my doubts are surrounding, when using labels, the declarations at the end of the program (marker:dc.w 1 ;example) are just values that substitute the correspondent labels in the program? Something the also confused me in relation to this was the undocumented use of for example: move #marker,d1
 and :      move marker,d1 (examples)
What's the difference after all? If I stand correct the first one copies the value of the label marker defined at the end, wich could be 1 for example (marker:dc.w 1), to the data register d1.
The second example copies the contents of the address $1 to the data register d1?! But the end defines marker as 1 not $1, so I suppose addresses can be refered to as decimal values too?

Resuming either I'm too dumb or this tutorial sucks!! :-x
Must admit I haven't learned other language though, but it seem pretty straightforward until this doubts come up.
I know there are some hardcore Amigans in here so let's do ourselves what we wan instead of just waiting and doing nothing, and one  can help each other. Now help me in this cause I'm starta getting pissed off, andI don't have time to clear these doubts by myself.
Cheers
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Assembler (68k) help (about dc pseudo op)
« Reply #1 on: January 13, 2003, 03:40:09 PM »
Thanks. More or less what I though. I guess what I need is to start practicing cause I'm starting to forget the doubts I had themselves!!
One thing I'd really need cleared would be:
When there's something for example  like
value_1: dc.w 1
value_2: dc.w 1

I know the second value would be at an uneven address so an align would be necessary but, how da hell do I know the address of value_1 is even? Does the compiler give me info about that?
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Assembler (68k) help (about dc pseudo op)
« Reply #2 on: January 13, 2003, 03:51:03 PM »
"RTFM"...
Yeah, but it should be easier to understand it if the tutorial taugh me it depended on the assembler.
I'm learning it cause from what I've always heard, migrating to ppc assembler is a breeze :-D
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Assembler (68k) help (about dc pseudo op)
« Reply #3 on: January 13, 2003, 04:14:16 PM »
I've read parts of Amigarealm various times, specially hardware reference stuff.
Lol. Skippy, you almost got me once, with that blonde girl pic you had before  :-o For some moments I though you were her.   :-D
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Assembler (68k) help (about dc pseudo op)
« Reply #4 on: January 13, 2003, 10:13:50 PM »
Thanks all for the help. I'll have to look more into it when I have time, but I defenitly will. It's great fun and I now think people that don't learn to programm miss all the fun. Much cooler than playing games!
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Assembler (68k) help (about dc pseudo op)
« Reply #5 on: January 21, 2003, 05:26:16 PM »
This is much more fun :-D And you learn a lot of stuff, at I do cause my studies are not computer related.
Later I'll learn C. I allways do the opposite normal people do :-D
\\"We made Amiga, they {bleep}ed it up\\"