Why is is telling me that my code
poruka: .ascii "Some string"
is not a valid instruction (label and a message) but if i write it asdb
then its okay.
The syntax and directives differs between assemblers. .ascii
is a directive recognized by the GNU assembler, but with NASM you use db
(declare byte) instead, as you've already discovered.
(Also interesting to me is if i write .section data instead section .data i get the following errors
Because section
is a directive recognized by NASM, and .section
is not. So NASM thinks that you're declaring a local label named section
(label names starting with a period are considered local in NASM syntax). So NASM sees a local label named section
followed by the word data
, which makes no sense.