FDOS / fdisk

Fixed Disk Setup Program - manages partitions using the MBR partitioning scheme
GNU General Public License v2.0
44 stars 14 forks source link

modify BOOTEASY.ASM to compile on current version of NASM #4

Closed micahcochran closed 3 years ago

micahcochran commented 3 years ago

BOOTEASY.ASM would compile on NASM 0.98.15, but won't compile on more current 2.1x.x versions.

On NASM version 2.13.02 here are the errors when given nasm -f obj BOOTEASY.ASM:

BOOTEASY.ASM:260: error: invalid parameter to [default] directive
BOOTEASY.ASM:311: warning: label alone on a line without a colon might be in error [-w+orphan-labels]

The error on 260 this error is due to DEFAULT now being a directive in NASM. I simply changed default to defaultLocal.

On line 311 is because of the end. I guess it was expecting a label. Perhaps end may have been some kind of keyword at some point. I dunno, I try to stay away from assembly if at all possible.

Fixing those two errors fixes the errors and the code assembles on NASM 2.1x.x.

I assembled the current code and then the changed code with NASM 0.98.15 and got the exact same .OBJ files.

I've used the program dhex under Linux to compare these binaries.

TOP is the original assembled with 0.98.15. BOTTOM is assembled with NASM 2.15.05 under DOS. The yellow hexadecimal and text are the changes. The version number is the only change. Screenshot from 2021-01-11 20-50-35

TOP is the original assembled with 0.98.15. BOTTOM is assembled with NASM 2.13.02 under Linux. The yellow hexadecimal and text are the changes. The version number and the filename being capitalized are the only changes. Screenshot from 2021-01-11 20-56-08

micahcochran commented 3 years ago

Thanks!