#9 ✓resolved
Peter Johnson

org directive parse errror for /f bin

Reported by Peter Johnson | June 25th, 2011 @ 07:48 PM | in 0.5.0 (closed)

Originally posted on Trac by tonyb@sysdev.org
Original Trac Ticket

  Description

    (last modified by peter@tortall.net)
    (diff)

  @@@

YASM version 0.2.1
NASM version 0.98.36
Asm code in test is of type:


;comments ;comments ; ..... bits 16
org 0x100

section .text

BEGIN:

    mov etc, etc,

. . .


The following line works:

nasm /f bin -otest.com dazzler.asm
(produces test.com) The same invokation in yasm fails:
yasm /f bin -otest.com dazzler.asm

file.asm:17: label or instruction expected at start of line
NOTES:
1) nasm's /f obj or win32
produce the same error as yasm, however /f bin succeeds!

2) remarking the org 0x100 line allows yasm to produce
the correct test.com output.


  
h3. Trac Attachments

h3. Trac Comments
comment:1
    
                  
                  Changed 8 years ago by peter@tortall.net
  Initial investigation shows this to be a preprocessor issue.  NASM only defines

org as a macro when bin is used as objfmt (ditto with other objfmt-specific
macros). YASM does not currently have a mechanism for handling this;
unfortunately these are the kinds of issues that are hard to solve the "right"
way within yasm's framework of multiple preprocs/parsers/objfmts, as there's not
one single macro format that we can assume to be in use.

As a workaround, use [org 0x100] instead of org 0x100.

Assigning to NASM-compatible preproc (really should be "real" NASM preproc since
we're using the real one at the moment).

  comment:1

              Changed 8 years ago by peter@tortall.net

  Status
    changed from new to assigned

  Component
    changed from parser: nasm-compatible to preprocessor: nasm-compatible

  Initial investigation shows this to be a preprocessor issue.  NASM only defines

org as a macro when bin is used as objfmt (ditto with other objfmt-specific
macros). YASM does not currently have a mechanism for handling this;
unfortunately these are the kinds of issues that are hard to solve the "right"
way within yasm's framework of multiple preprocs/parsers/objfmts, as there's not
one single macro format that we can assume to be in use.

As a workaround, use [org 0x100] instead of org 0x100.

Assigning to NASM-compatible preproc (really should be "real" NASM preproc since
we're using the real one at the moment).

  Status
    changed from new to assigned

  Component
    changed from parser: nasm-compatible to preprocessor: nasm-compatible

comment:2
    
                  
                  Changed 8 years ago by peter@tortall.net
  comment:2

              Changed 8 years ago by peter@tortall.net

  target_milestone
    changed from 0.2.0 to 0.3.0

  Version
    changed from other to 0.2.1

  Component
    changed from preprocessor: nasm-compatible to preprocessor:

  target_milestone
    changed from 0.2.0 to 0.3.0

  Version
    changed from other to 0.2.1

  Component
    changed from preprocessor: nasm-compatible to preprocessor:

comment:3
    
                  
                  Changed 8 years ago by peter@tortall.net
  A workaround has been implemented in r1.3 of modules/preprocs/nasm/standard.mac

in CVS. Leaving this bug open until a real internal fix is implemented, but in
terms of user visibility, this is fixed (e.g. ORG now works as expected).

  comment:3

              Changed 8 years ago by peter@tortall.net

  Component
    changed from preprocessor: to preprocessor: 'real' nasm

  A workaround has been implemented in r1.3 of modules/preprocs/nasm/standard.mac

in CVS. Leaving this bug open until a real internal fix is implemented, but in
terms of user visibility, this is fixed (e.g. ORG now works as expected).

  Component
    changed from preprocessor: to preprocessor: 'real' nasm

comment:4
    
                  
                  Changed 7 years ago by peter@tortall.net
  comment:4

              Changed 7 years ago by peter@tortall.net

  Description
    modified (diff)

  Milestone
    changed from 0.3.0 to 0.5.0

  Description
    modified (diff)

  Milestone
    changed from 0.3.0 to 0.5.0

comment:5
    
                  
                  Changed 6 years ago by peter@tortall.net

Fixed in [1199].

  comment:5

              Changed 6 years ago by peter@tortall.net

  Status
    changed from assigned to closed

  Resolution
    set to fixed

Fixed in [1199].

  Status
    changed from assigned to closed

  Resolution
    set to fixed

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The Yasm Modular Assembler Project

Shared Ticket Bins

People watching this ticket

Referenced by

Pages