Author Topic: what a new compiler's orders are  (Read 12261 times)

Offline codeferever

  • Jr. Member
  • *
  • Posts: 21
what a new compiler's orders are
« on: September 17, 2010, 12:24:15 PM »
Hello!Today I have scaned one of my friend's book about 80c51.And a  problem comes to me that why there is a "acall myfunc" but not a "call". Well,he using KEIL,not nasm(maybe he will download one as I suggested him ;)  ).
I wonder if there are some formats and directives defined by intel and all the some between nasm,masm,as86 or keil...
How could I know what a new compiler's orders are ? ???

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: what a new compiler's orders are
« Reply #1 on: September 17, 2010, 01:35:55 PM »
Read the manual?

Nasm targets the 80x86 architecture - won't help your friend with his 80c51, I'm afraid. Keil won't even tell you the price for their assembler, you have to request a quote. That puts it out of my price range! :) Typing "80c51 assembler" into Google comes up with some free ones...

Sounds like an interesting chip, but Nasm won't work on it.

Best,
Frank


Offline codeferever

  • Jr. Member
  • *
  • Posts: 21
Re: what a new compiler's orders are
« Reply #2 on: September 19, 2010, 03:05:31 AM »
Thank you,Frank!
well,when I was reading bootsect.s of linux0.12,I have always found such directives as
"rep movw",
"seg fs",
"lgs si,(bx)",
"j load_setup"

I don't know if these directives can also be effective for nasm?
 Or which part of nasm manual can clarify the puzzling problems?  :)

Offline Keith Kanios

  • Full Member
  • **
  • Posts: 383
  • Country: us
    • Personal Homepage
Re: what a new compiler's orders are
« Reply #3 on: September 19, 2010, 04:09:06 AM »
well,when I was reading bootsect.s of linux0.12,I have always found such directives as
...
I don't know if these directives can also be effective for nasm?
 Or which part of nasm manual can clarify the puzzling problems?  :)

Wrong assembler... that is AT&T syntax ala GAS.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: what a new compiler's orders are
« Reply #4 on: September 20, 2010, 10:39:24 PM »
Actually, I think it's as86 syntax - kind of a weird hybrid of Intel and AT&T. Not for Nasm, in any case!

"rep movw", -> "rep movsw"
"seg fs", -> just "fs" probably?
"lgs si,(bx)", -> "lgs si, [bx]"
"j load_setup" -> just "jmp", I would guess (maybe "jmp short"?)

Some "context" might help - we know what a bootsector "has to do", even if the syntax is unfamiliar. Got a link to the exact "bootsect.s" you're looking at? (save us looking it up...)

Best,
Frank