0

i am using ubuntu 20.04 and i am new at asmebly languge. plz guide me regarding this error. i want read a char from keyboard and print it on console.

  1. here is code

.MODEl SMALL .STACK 100h .CODE

MAIN PROC mov ah,01 int 21h mov bl,al mov ah,02 mov dl,bl int 21h

END MAIN

output enter image description here

  • That's not a source format accepted by NASM. – ecm Mar 06 '21 at 07:23
  • then what format it can be. please guide. – Dr. Sikandar Mar 06 '21 at 07:49
  • 1
    That code is MASM/TASM and specifically for writing DOS applications. – Michael Petch Mar 06 '21 at 08:01
  • 2
    You should probably find a tutorial for NASM specifically. [Tutorialspoint](https://www.tutorialspoint.com/assembly_programming/index.htm) has on OK tutorial that I first used, but its for 32-bit assembly and only went into the very basics. [This](https://cs.lmu.edu/~ray/notes/nasmtutorial/) is also a good tutorial for x64, but you might just find it to be a bit too fast-paced. And, of course, always keep the [NASM manual](https://www.nasm.us/doc/) handy. – mediocrevegetable1 Mar 06 '21 at 08:08
  • Oh, and also something to note: That NASM manual may have a few features you won't be able to use because last time I checked, NASM 2.15.05 is not supported for debian-based systems. I believe the version you probably have is 2.14.02, so here's the manual for that: https://www.nasm.us/xdoc/2.14.02/nasmdoc.pdf – mediocrevegetable1 Mar 06 '21 at 08:26

0 Answers0