assume ds:data, cs:code, ss:stack data segment db 16 dup(0) data ends stack segment db 16 dup(0) stack ends code segment start: mov ax, data mov ds, ax mov ax, stack mov ss, ax mov sp, 16 mov ah, 4ch int 21h code ends end start
assume ds:data, cs:code, ss:stack data segment db 4 dup(0) data ends stack segment db 8 dup(0) stack ends code segment start: mov ax, data mov ds, ax mov ax, stack mov ss, ax mov sp, 8 mov ah, 4ch int 21h code ends end start
assume ds:data, cs:code, ss:stack data segment db 20 dup(0) data ends stack segment db 20 dup(0) stack ends code segment start: mov ax, data mov ds, ax mov ax, stack mov ss, ax mov sp, 20 mov ah, 4ch int 21h code ends end start
assume ds:data, cs:code, ss:stack code segment start: mov ax, data mov ds, ax mov ax, stack mov ss, ax mov sp, 20 mov ah, 4ch int 21h code ends data segment db 20 dup(0) data ends stack segment db 20 dup(0) stack ends end start
assume cs:code code segment mov ax, 0b800h mov ds, ax mov bx, 00f00h mov cx, 50 s:mov byte ptr [bx], 3 inc bx mov byte ptr [bx], 4 inc bx loop s mov ah, 4ch int 21h code ends end
assume cs:code data1 segment db 50, 48, 50, 50, 0, 48, 49, 0, 48, 49 ; ten numbers data1 ends data2 segment db 0, 0, 0, 0, 47, 0, 0, 47, 0, 0 ; ten numbers data2 ends data3 segment db 16 dup(0) data3 ends code segment start: mov ax, data1 mov ds, ax mov cx, 10h mov bx, 0 s:mov al, [bx] mov [bx+20h], al mov al, [bx+10h] add [bx+20h], al inc bx loop s mov ah, 4ch int 21h code ends end start
assume cs:code data1 segment dw 2, 0, 4, 9, 2, 0, 1, 9 data1 ends data2 segment dw 8 dup(?) data2 ends code segment start: mov ax, data1 mov ds, ax mov ax, data2 mov es, ax mov bx, 0 mov bp, 000eh mov cx, 8h s:mov ax, [bx] mov es:[bp], ax dec bp dec bp inc bx inc bx loop s mov ah, 4ch int 21h code ends end start
assume cs:code, ds:data data segment db 'Nuist' db 2, 3, 4, 5, 6 data ends code segment start: mov ax, data mov ds, ax mov ax, 0b800H mov es, ax mov cx, 5 mov si, 0 mov di, 0f00h s: mov al, [si] and al, 0dfh mov es:[di], al mov al, [5+si] mov es:[di+1], al inc si add di, 2 loop s mov ah, 4ch int 21h code ends end start
assume cs:code, ds:data data segment db 'Pink Floyd ' db 'JOAN Baez ' db 'NEIL Young ' db 'Joan Lennon ' data ends code segment start: mov ax, data mov ds, ax mov bx, 0 mov cx, 4 s:mov al, [bx] or al, 00100000b mov [bx], al add bx, 10h loop s mov ah, 4ch int 21h code ends end start
assume cs:code, ds:data, es:table data segment db '1975', '1976', '1977', '1978', '1979' dw 16, 22, 382, 1356, 2390 dw 3, 7, 9, 13, 28 data ends table segment db 5 dup( 16 dup(' ') ) ; table ends code segment start: mov ax, data mov ds, ax mov ax, table mov es, ax mov bx, 0 mov cx, 5 mov si, 0 s:mov di, bx add di, bx mov ax, [di] mov es:[si], ax mov ax, [di+2] mov es:[si+2], ax mov byte ptr es:[si+4], ' ' mov word ptr es:[si+5], 0 mov ax, [bx+20] mov es:[si+7], ax mov byte ptr es:[si+9], ' ' mov ax, [bx+30] mov es:[si+10], ax mov byte ptr es:[si+12], ' ' mov ax, [bx+20] div byte ptr [bx+30] mov byte ptr es:[si+13], 0 mov byte ptr es:[si+14], al mov byte ptr es:[si+15], ' ' add bx, 2 add si, 16 loop s mov ah, 4ch int 21h code ends end start