Lab 07,08 - Assembly Language for x86 Processors by KIP R. IRVINE

Поделиться
HTML-код
  • Опубликовано: 4 янв 2025
  • Topics: Indirect Addressing, JMP, LOOP
    .
    .
    Material Link: www.dropbox.co...
    .
    CODE:
    ;OFFSET Operator
    ;PTR Operator
    ;TYPE Operator
    ;LENGTHOF Operator
    ;SIZEOF Operator
    .386
    .model flat, stdcall
    .stack 4096
    include Irvine32.inc
    ;-- Data segment to make variables
    .data
    msg1 db "outer loop",0
    msg2 db "inner loop", 0
    arr dw 10h,20h,30h
    ;-- code segment starts here
    .code
    main proc
    mov esi , OFFSET arr
    mov ax, 0
    add al, [esi] ; 0+10
    int esi ;address of 20h
    add al, [esi] ; 10+20
    inc esi ; address of 30h
    add al, [esi]
    ;
    mov [esi] , 40
    mov word ptr [esi] , 40h
    esi, byte
    esi, word
    esi, Double word
    invoke ExitProcess,0
    main endp
    end main

Комментарии •