#Assembly Language Help
8 messages in this thread
I have a little problem. I recently bought the MANX C compiler. It is great but
soon I began to use the assembler for a few fast routines (graphics). Anyway,
the manual doesn't cover the specifics of the assember directives or any other
orginization at all. So I need help.
Specifically, I was wondering if it was possible to allocate a data section
with the allocation of MEMF_CHIP? I have seen several examples of assembly code
with a declaration similar to –> initvars PUBLIC. Isn't this one of the
possible choices when requesting memory, and if it is, how do you combine two?
Obviously I just need some space in the lower 512K for graphics, but in
general I probably need a manual of some kind. Does anyone know of a good
reference manual for 68000 assembler?
Thanks and I really appreciate any help I can get!
— Julian L. Brown
CIS 74516,716
UUCP !well!jlb
Julian,
I wish I could help with your question, but I too have problems with Manx
Assembler documentation. After spending too much money calling Manx (who were
insultingly unresponsive), I have given up on assembly language until I can
afford the Metacomco. I don't want to sound too discouraging, as you sound
rather more advanced in your studies than I, but I would appreciate being
remembered if you find any good sources of further information.
Thanks,
Don Weed
Donald,
I'm sorry you had such trouble with Manx. I have found that assembly
language is quite easy to program in, once you have the right documentation.
With assembly language, I feel like I'm more in touch with the machine; somehow
closer to the chips and electricity. I know that sounds strange, but you have
such power, such control over the machine!
Anyway, please feel free to ask me anything about 68000 programming. If I
don't know the answer, I'm sure someone else will (and I would love to find out
more about it too).
— Julian L. Brown
Yours is one of two typical reactions to assembler. I happen to also fall into
your group: "I feel like I'm more in touch with the machine, somehow closer to
the chips and electricity… you have such power, such control over the
machine!"
This is absolutely and completely true, and there in nothing strange sounding
about it. Assembly is programming on the "bare metal"; you are dealing
directly with the architecture of the target system, allowing you to write the
tightest, most optimized code for your application. You do not have to "code
around" limitations of the language in which you are working… the only thing
you have to deal with are the limitations of the system's architecture.
The other reaction, of course, is the "I hate assembly because it's too
hard/niddly/involved <pick one>. I want to PROGRAM; I don't want to be
bothered with all those picky details like keeping memory maps and variable
charts and whether I want to branch unsigned or arithmetic. Phooey. Give me a
high level language that handles all the grunt work so I can get on with the
actual code writing."
Of course neither group is right nor wrong; it's all a matter of personal
preference and style. But, it seems to me that those who like Assembly also
tend to prefer C over BASIC or Pascal, because C is "closer" to assembly
language and the machine. People who cut their teeth on HLLs, instead, seem to
dislike C because of it's "inconsistencies" and all the things it DOESN'T do
for you.
Forgive the spelling if it's wrong, but… "Vive' la Difference!"
Rick
//
\X/ Lynn <– Luv assembly (dislike most others)
It should come as no surprise that C is little more than warmed over PDP-11
assembly language. (With flow of control macros) When one works with data in C,
one IS programming in assembler. This can be both a blessing and a curse.
Julian,
I can't remember the specifics, but the hunks are allocated at either
assembly or link time, and are specified by option flags. -cpd sticks in my
mind, but I can't remember whether it was in the assembler or linker command
line. If you have trouble finding the options in your manual, I can probably
dig out and dust off mine to take a look.
Regards, Larry.
Larry,
Thanks very much for the info. When you mentioned that the hunks were
allocated in the linker, I found the reference (hidden way in the back of
linker documentation) to the +C option.
Here is the example for anyone who might have had the same problem: at
linking use the +C option with one of three letters following.
Example: ln program +Ccdb
The uppercase letter denotes CHIP memory while the lower case letters
represent code, initialized data, and uninitialized data respectively. The +F
option can also be used to force a load into FAST memory in the same way that
C+ is used. Any combination of c, d, and b can be used, while leaving a letter
out or not including +C at all will default to FAST memory if you have it or
CHIP memory if you don't.
Again, thanks Larry for pointing me in the right direction!
— Julian L. Brown