Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [org 0x7c00]
- xor ax, ax
- mov es, ax
- mov ds, ax
- mov dl, [bootDiskNum]
- mov ah, 2
- mov al, 7
- mov ch, 0
- mov cl, 2
- mov dh, 0
- mov bx, 0x7e00
- int 0x13
- mainLoop:
- mov bx, intro
- call printString
- call newLine
- mov bx, cmdBuffer
- xor cx, cx
- waitForKey:
- mov ah, 0
- int 0x16
- push bx
- push cx
- mov bx, badChar
- mov cl, 0x00
- cmpLoop:
- inc bx
- cmp ah, [bx]
- je popBack
- cmp [bx], cx
- jne cmpLoop
- pop cx
- pop bx
- jmp continue
- popBack:
- pop cx
- pop bx
- jmp waitForKey
- continue:
- mov ah, 0x0e
- cmp al, 0x0d
- je enterKey
- cmp al, 0x08
- je backspaceKey
- cmp cx, 63
- je waitForKey
- int 0x10
- mov [bx], al
- inc bx
- inc cx
- jmp waitForKey
Advertisement
Add Comment
Please, Sign In to add comment