Keresés

Hirdetés

Új hozzászólás Aktív témák

  • zka67

    őstag

    válasz kemkriszt98 #357 üzenetére

    Szia, először is:
    mov al,"a"

    Ha elolvasod a BIOS funkció paraméterét, te is láthatod, hogy az csak egy karaktert ír ki a TTY-ra, mégpedig azt, ami az AL regiszterben van. Ha jól emlékszem, akkor a BH és BL regisztereket is be kell állítani, mielőtt meghívod a 10h megszakítást. (BH=page, BL=color).

    Használhatod helyette a DOS hívásokat, INT 21h

    Function 2h: Display Output. Outputs the character in DL to the standard output device.
    Input: AL = 02h, DL = character
    Output: none

    Szöveg kiírásához pedig ezt:

    Function 09h: Print String. Outputs the characters in the print string to the standard output device.
    Input: AH=09h, DS:DX = pointer to the character string ending with '$'
    output: none

    org 0x7c00
    mov dl,"a"
    call print
    jmp $
    print:
    mov ah,2
    int 21h
    ret


    org 0x7c00
    mov dx,MSG
    call print
    jmp $
    print:
    push ds
    mov ax,cs
    mov ds,ax
    mov ah,9
    int 21h
    pop ds
    ret
    MSG:
    db "Alma$"

Új hozzászólás Aktív témák