Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CPU 8086
- BITS 16
- ORG 100h
- ;More enterable in the prompt
- ;Can't use: 00h, 03h, 07h, 08h, 09h, 0Ah, 0Dh, 1Ah, 1Bh, 26h, 3Ch, 3Eh, 7Ch, DDh, FFh
- Start:
- MOV AL, 0Eh
- DEC AL
- MOV byte [B01F0], AL
- MOV byte [B0217], AL
- SUB AL, 04
- INC AL
- MOV byte [B01F0+1], AL
- MOV byte [B0217+1], AL
- MOV AH, 30h
- INT 21h
- XCHG AH, AL
- DEC AX
- CMP AX, 01FEh
- JA short P0114
- MOV DX, B01FC
- MOV AH, 12h
- SHR AH, 01h
- INT 21h
- INT 20h
- P0114:
- MOV byte [B01E7], 19h ;MOV byte ptr [B01E7], 19h ;
- MOV AH, 0Fh
- INT 10h
- XCHG AH, AL
- MOV [B01E8], AL
- NOP ;MOV DX, B0217
- NOP ;MOV AH, 12h
- NOP ;SHR AH, 01h
- NOP ;INT 21h
- XOR BX, BX
- MOV AH, 45h
- INT 21h
- MOV BP, AX
- MOV AH, 3Dh
- INC AH
- INT 21h
- MOV BX, 8002h
- AND BX, 010Fh
- MOV AH, 45h
- INT 21h
- P013B:
- CLD
- MOV DX, B021A
- MOV CX, 1001h
- DEC CX
- MOV BX, BP
- MOV AH, 3Fh
- INT 21h
- AND AX, AX ;OR AX, AX
- JNZ short P014E
- P014C:
- INT 20h
- P014E:
- MOV CX, AX
- MOV SI, DX
- P0152:
- LODSB
- XOR AH, AH
- INC AH
- TEST AL, 80h
- JZ short NotAE80
- ADD AL, 80h
- JMP EndOfCmpALs
- NotAE80:
- OR AL, 80h
- CMP AX, 019Ah
- JZ short P014C
- CMP AX, 018Dh
- JNZ short P0162
- NOP
- NOP
- NOP
- MOV BYTE [B01EA], 01h ;MOV BYTE PTR [B01EA], 01h ;
- JMP P01AE
- NOP
- P0162:
- CMP AX, 018Ah
- JNZ short P016C
- INC BYTE [B01E9] ;INC BYTE PTR [B01E9] ;
- JMP P01AE
- P016C:
- CMP AX, 0188h
- JNZ short P017D
- NOP
- MOV DL, byte [B01EA]
- XOR DH, DH
- INC DH
- CMP DX, 0101h ;CMP BYTE [B01EA], 01h ;CMP BYTE PTR [B01EA], 01h ;
- JZ short P01AE
- DEC BYTE [B01EA] ;DEC BYTE PTR [B01EA] ;
- JMP short P01AE
- P017D:
- CMP AX, 0189h
- JNZ short P0193
- ;PUSH DX
- MOV DH, [B01EA]
- ADD DH, 06h
- INC DH
- AND DH, 0F8h
- INC DH
- MOV [B01EA], DH
- ;POP DX
- JMP short P01AE
- P0193:
- CMP AX, 0187h
- JZ short P01AE
- EndOfCmpALs:
- INC BYTE [B01EA] ;INC BYTE PTR [B01EA] ;
- ;PUSH DX
- ;MOV DL, AL
- MOV DH, [B01EA]
- ;MOV AX, DX
- ;POP DX
- CMP DH, [B01E8]
- JBE short P01AE
- NOP
- NOP
- INC BYTE [B01E9] ;INC BYTE PTR [B01E9] ;
- MOV BYTE [B01EA], 01h ;MOV BYTE PTR [B01EA], 01h ;
- P01AE:
- SUB AL, 80h
- MOV DL, AL
- MOV AH, 02h
- INT 21h
- MOV DH, [B01E9]
- CMP DH, [B01E7]
- JB P01DE
- MOV DX, B01F0
- MOV AH, 12h
- SHR AH, 01h
- INT 21h
- MOV AH, 0Ch
- MOV AL, 01h
- INT 21h
- MOV DX, B0217
- MOV AH, 12h
- SHR AH, 01h
- INT 21h
- MOV BYTE [B01EA], 01h ;MOV BYTE PTR [B01EA], 01h ;
- MOV BYTE [B01E9], 01h ;MOV BYTE PTR [B01E9], 01h ;
- DEC SI
- INC CX
- P01DE:
- DEC CX
- NOP
- NOP
- JZ short P01E4
- NOP
- JMP near P0152 ;E943FF - E941FF
- P01E4:
- JMP near P013B ;E928FF - E926FF
- ;NOP
- ;NOP
- ;NOP
- ;NOP
- ;Data
- B01E7 DB 18h
- B01E8 DB 50h
- B01E9 DB 01h
- B01EA DB 01h
- ;B01EB DB 00h, 00h ;There should be 5, but I don't see why
- B01F0 DB 8Dh, 8Ah, '-- More --$'
- B01FC DB 'MORE: Incorrect DOS Version'
- B0217 DB 8Dh, 8Ah, '$' ;{CRLF}$'
- ;B021A DB 00h, 00h ;There should be 55h of these, but I have no idea why
- ;Data?
- B021A RESB 1000h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement