diff --git a/asm1/lab1/nasm.asm b/asm1/lab1/nasm.asm new file mode 100644 index 0000000..2e76878 --- /dev/null +++ b/asm1/lab1/nasm.asm @@ -0,0 +1,16 @@ +section .data + s: db 'HELLO WORLD', 10 ; 10 = '\n' + +section .text + global _start ; adding _start name to object code + +_start: + mov eax, 4 ; system call 'write' + mov ebx, 1 ; write to stdout + mov ecx, s ; string adr + mov edx, 12 ; string len + int 80h + + mov eax, 1 ; system call 'exit' + mov ebx, 0 ; exit code + int 80h \ No newline at end of file diff --git a/asm1/lab1/tasm.asm b/asm1/lab1/tasm.asm new file mode 100644 index 0000000..4127b2a --- /dev/null +++ b/asm1/lab1/tasm.asm @@ -0,0 +1,16 @@ +.model small ; small memory model (64 KB) +.stack 100h ; reserve 100h bytes for stack +.data + message db 'HELLO WORLD', 13, 10, '$' ; 13 = \r, 10 = \n, string must be terminated with $ +.code +start: + mov ax, @data ; unable to put in ds directly + mov ds, ax + mov dx, offset message ; offset of the message (0) + mov ah, 09h ; display string ds:dx + int 21h ; main system interrupt + + mov al, 0 ; return code 0 + mov ah, 4Ch ; terminate with return code + int 21h +end start \ No newline at end of file diff --git a/asm1/lab1/лаб1_отчёт.docx b/asm1/lab1/лаб1_отчёт.docx new file mode 100644 index 0000000..98825c5 Binary files /dev/null and b/asm1/lab1/лаб1_отчёт.docx differ diff --git a/asm1/lab1/лабораторная 1.1.docx b/asm1/lab1/лабораторная 1.1.docx new file mode 100644 index 0000000..92a550e Binary files /dev/null and b/asm1/lab1/лабораторная 1.1.docx differ