Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.fl 0 broken in MADS 2.1.5 #8

Closed
phaeron1024 opened this issue Dec 23, 2022 · 0 comments
Closed

.fl 0 broken in MADS 2.1.5 #8

phaeron1024 opened this issue Dec 23, 2022 · 0 comments

Comments

@phaeron1024
Copy link

Latest versions of MADS on Win32 seem to have a bug with the .fl directive when emitting zero: they emit 6 extra bytes to the output, which is not reflected in the PC, corrupting the executable.

Repro case:

    org $2000
    .fl 0

MADS 2.1.0 build 8:

Writing listing file...
Writing object file...
2 lines of source assembled in 2 pass
12 bytes written to the object file

MADS 2.1.5 build 3:

Writing listing file...
Writing object file...
2 lines of source assembled in 2 pass
18 bytes written to the object file

The hex dump of the executable shows 6 extra bytes that should not be there, although the DOS segment header still indicates only 6 bytes ($2000-2005):

00000000: FF FF 00 20 05 20 00 00-00 00 00 00 0E 00 00 00
00000010: 00 00

This only happens with 0 and -0. Non-zero values emit 6 bytes as expected.

tebe6502 added a commit that referenced this issue Dec 26, 2022
@tebe6502 tebe6502 closed this as completed Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants