Re: create a file
- From: Frank Kotler <fbkotler@xxxxxxxxxxx>
- Date: Mon, 16 May 2005 20:56:08 -0400
Herbert Kleebauer wrote:
>
> Frank Kotler wrote:
> > Utilisateur1 wrote:
>
> > > mov offset week,al ; 0=Sunday
> >
> > There's a "syntax issue" here that I think is messing you up
> > later. "offset week" is a number - like "5" - you can't put
> > the contents of al into the number "5"... but you could put
> > it into memory-location 5. What you've asked for is
> > literally impossible. If your assembler is assembling this,
> > it *must* be putting al in to a memory location! So far, so
> > good...
>
> But this problems only arise because of the wired "Intel syntax".
Yeah, we know you don't like Intel syntax (but recommend the
Intel manuals...).
> No wonder nobody wants to learn assembly programming.
What in the world gives you that idea? We've got one on the
hook right now! :)
> Had to assemble and disassemble it to see what's happen.
> Very interesting how A86 ties to correct the "syntax issue"
> the programmer made.
Yeah. A86 is essentially "Intel syntax" but tries *really*
hard to be "helpful"... It'll allow "mov ds, cs", for
example (generates "push cs"/"pop ds", of course). In this
case, being "helpful" is keeping Utilisateur1 from
understanding what "offset" means. As a "src", it's valid.
As a "dest", it's not... so a86 silently ignores it... Not
as good an idea as it sounds at first, IMO.
....
> 0000006e: 0000016e: bb 0196 move.w #_0196,r3 ; <--
Right. You want "move.w _0196, r3" not "move.w #_0196, r3".
I assume Daniella will holler about "move.w r0, #_0196",
which might begin to give a person an idea what "#" means...
Somehow, I'm not sure if this is going to clarify things for
the original poster...
Best,
Frank
.
- References:
- create a file
- From: Utilisateur1
- Re: create a file
- From: Frank Kotler
- Re: create a file
- From: Herbert Kleebauer
- create a file
- Prev by Date: Re: Free Pascal 2.0 is now available
- Next by Date: Re: Fast UTF-8 strlen function
- Previous by thread: Re: create a file
- Next by thread: Re: create a file
- Index(es):
Relevant Pages
|