Search code examples
assemblydosx86-16bios

Set console to 50 line mode with a DOS or BIOS call?


I have the following code disassembled from a file called 43line.com which resets the number of lines in cmd in dosbox.

0100 B8 12 11                MOV AX,01112
0103 B3 00                   MOV BL,0
0105 CD 10                   INT 010
0107 29 C0                   SUB AX,AX
0109 8E D8                   MOV DS,AX
010B FF 36 87 04             PUSH W[0487]
010F 80 0E 87 04 01          OR B[0487],1
0114 B9 00 06                MOV CX,0600
0117 B4 01                   MOV AH,1
0119 CD 10                   INT 010
011B 8F 06 87 04             POP W[0487]
011F BA B4 03                MOV DX,03B4
0122 B8 14 07                MOV AX,0714
0125 EF                      OUT DX,AX
0126 CD 20                   INT 020

How can the console be set to 50 lines instead of 43?


Solution

  • The answer to my question is:

    Switch back to 25 line mode:

    MOV AX,01111
    MOV BL,0
    INT 010
    

    Switch to 43 line mode:

    MOV AX,01112
    MOV BL,0
    INT 010
    

    Switch to 50 line mode:

    MOV AX,01112
    MOV BL,3
    INT 010