Baron-von-Riedesel / JWasm

Masm compatible assembler
107 stars 24 forks source link

Syntax error using .FPO #30

Open luizfernandonb opened 1 month ago

luizfernandonb commented 1 month ago

I was trying to learn MASM and I saw about .FPO, I tried to use it in my code and it didn't work, it gave me a syntax error, but if I compile without .FPO it works

Here's some code to serve as an example:

.MODEL small
.STACK 100h
.DATA
.CODE

sample proc
.FPO (0, 0, 0, 0, 0, 0)

    int 3

sample endp

end sample

If you remove the .FPO and compile it works normally

One point that I found curious, if you don't use the -Zm parameter, the FPO name doesn't appear in the error

With -Zm:

JWasm v2.18, Jun 7 2024, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.

test.asm(7) : Error A2209: Syntax error: .FPO
test.asm: 13 lines, 1 passes, 0 ms, 0 warnings, 1 errors

Without -Zm:

JWasm v2.18, Jun 7 2024, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.

test.asm(7) : Error A2209: Syntax error: .
test.asm: 13 lines, 1 passes, 0 ms, 0 warnings, 1 errors

Documentation about the FPO

Baron-von-Riedesel commented 1 month ago

I'm afraid the .FPO directive isn't implemented in either JWasm or Masm ( up to v10 ). Since Masm doesn't offer "frame pointer omission", it seems a bit moot ( even more so because it's meant for debugging support only ).