I'm trying to make my own OS (it's a project). For this project I created a simple bootloader which would wait for the user to input the height and width of an geometric figure (like a square) .
 Then the bootloader would show the figure after the user presses enter. When I simply run it on windows (I ran the com version of the assembly) it works perfectly. But on a VM (oracle) it just shows the "_" character. This is the bootloader:
[BITS 16]
[ORG 0x7C00]
main:
    ;mov ah,02h
    ;mov bh,0h
    ;mov dh,0h    <---tried even this(it suppose to create a cursor)
    ;mov dl,0h
    mov ax,00000011b   ;color
    push ax
    mov ax,0    ;fill
    push ax
    ;HEIGHT
    call read_one_key
    mov ah,0h;clear ax
    push ax
    ;WIDTH
    call read_one_key
    mov ah,0h;clear ax
    push ax
    mov ax,100    ;X POS
    push ax
    mov ax,100    ;Y POS
    push ax
    call pause ;wait for enter
    call rectangle
jmp $
rectangle:
    ;STACK:
    ; ----14  ->line color
    ; ----12  -> fill
    ; ----10  -> height
    ; ---- 8  -> width
    ; ---- 6  -> x pos  --|
    ; ---- 4  -> y pos  --| of the top left corner
    ;Reads from stack
    push bp
    mov bp,sp
    ;Switch to VGA mode
    mov ah,00h
    mov al,13h
    int 10h
    ;mov bx,[bp+4] ;takes the last registered parameter
    mov cx,[bp+6] ;takes the x (column)-will change
    mov dx,[bp+4] ;the line is being drwn on a single row
    mov al,[bp+14]
    loop_hor_to_R:
        ;Row remains the same
        ;The column changes
        inc cx
        call point
        mov bx,[bp+8]
        add bx,[bp+6]       
        cmp bx,cx
        jne loop_hor_to_R
    loop_ver_to_D:
        ;Row changes
        ;The column remains the same (was set previusly in bx)
        inc dx
        call point
        mov bx,[bp+4]
        add bx,[bp+10]
        cmp bx,dx
        jne loop_ver_to_D
    loop_hor_to_L:
        ;Row remains the same
        ;The column changes
        dec cx
        call point   
        mov bx,[bp+6] ;left limit of square(starting x)
        cmp bx,cx
        jne loop_hor_to_L   
     loop_ver_to_U:
        ;Row changes
        ;The column remains the same (was set previusly in bx)
        dec dx
        call point
        mov bx,[bp+4]
        cmp bx,dx
        jne loop_ver_to_U 
    pop bp
    ret
point:
    ;CX ,DX-column and row
    mov ah,0Ch
    mov bh,0h  ;page number
    int 10h
    ret
read_one_key:
    ;reads a letter from keyboard and transforms it in a number
    ;the number is stored in al
    mov ah,01h
    int 21h
    ret
pause:
    ;waits for enter to be pressed
    ;Switch to text mode
    text_loop:
        ;Read key
        mov ah,01h
        int 21h
        cmp al,0Dh;Enter code in hex
        jne text_loop
    ret
write_text:
    mov ah,02h
    mov dl,'!'
    int 21h
    ret
; End Matter
times 510-($-$$) db 0   ; Fill the rest with zeros
dw 0xAA55       ; Boot loader signature
I haven't implemented the fill yet. This is what I get when running it on VM:
Why is that?

 
    