Dyskusja:Asembler x86/Pierwszy program/FASM

Treść strony nie jest dostępna w innych językach.
Z Wikibooks, biblioteki wolnych podręczników.

Spróbowałem ten program, i FASM (versja 1.71.57 dla DOS-u, 2016-09-27) pokazuje kilka błędów; poprawiona wersja dyrektyw FASM:

        format  ELF executable
        entry   _start
        segment writable
tekst   db      "Hello World!",0Ah
        segment executable
_start: xor ebx, ebx
        ...

Format jest "ELF executable", nie sam "ELF", a segmenty nie mają nazw, mają atrybuty, więc "entry" podaje samą nazwę, bez segmentu. Poza tym, "\n" nie jest rozpoznawane jako NL, tylko jako znaki backslash i 'n' - trzeba użyć liczbowej wartości NL-a 0Ah=10.

The text in English: I tried the program, and FASM (version 1.71.57 for DOS, 2016-09-27) shows few errors; fixed versions of FASM directives are: / The format is "ELF executable", not just "ELF", and segments have no names, they have attributes, so "entry" specifies name alone, not "segment:name". Also, "\n" is not recognized as NL, but as chars backslash and 'n' - need use NL's numeric value 0Ah=10.

Jerzy Tarasiuk, Wydział Fizyki UW