#9 (org directive parse errror for /f bin) – The Yasm Modular Assembler Project

Ticket #9 (closed defect: fixed)

Opened 6 years ago

Last modified 2 years ago

org directive parse errror for /f bin

Reported by: tonyb@… Owned by: peter@…
Priority: P2 Milestone: 0.5.0
Component: Preprocessor: 'real' NASM Version: 0.2.1
Severity: normal Keywords:
Cc:

Description (last modified by peter@…) (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.

Attachments

Change History

comment:1 Changed 6 years ago by peter@…

  • 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).

comment:2 Changed 6 years ago by peter@…

  • 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 5 years ago by peter@…

  • 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).

comment:4 Changed 4 years ago by peter@…

  • description modified (diff)
  • milestone changed from 0.3.0 to 0.5.0

comment:5 Changed 4 years ago by peter@…

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in [1199].

Add/Change #9 (org directive parse errror for /f bin)

Author



Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.