spamtrap@crayne.org wrote:
> On Mon, 30 Jan 2006 02:48:28 GMT, Tim Roberts <spamtrap@crayne.org>
> wrote:
>
> <snip>
> >There are only a few valid text modes. To the best of my knowledge, a text
> >mode can either be 80 wide or 132 wide.
> Usual standard modes, normally, yes. But, there is no reason that one
> could not just reprogram the vga card to get whatever size you want.
> You do have to know how to do that, which I don't. There are times
> where a 90x25 or 100x30 would be useful.
>
> <snip>
>
> --
> ArarghMail601 at [drop the 'http://www.' from ->] http://www.arargh.com
> BCET Basic Compiler Page: http://www.arargh.com/basic/index.html
>
> To reply by email, remove the garbage from the reply address.
You could write all your own stuff in a graphics mode?
[BITS 16]
[ORG 0x0100]
[SEGMENT .data]
coords times 480 dw 0
window times 480 db 0
task db 10
vinfo times 255 db 0
[SEGMENT .text]
main:
;set up LUT tables and initialize vesa
call define_coords
call define_window
call initvesa
mov ax,0 ; color
next_color:
push ax ; save current color
mov dx,0 ; y coord
y_loop:
mov bx,0 ; x coord
x_loop:
call putpixel
inc bx
cmp bx,640
jnz x_loop
inc dx
cmp dx,480
jnz y_loop
mov ah,07h ;wait keypress
int 21h
pop ax ;get color
inc ax ;next color
cmp ax,16 ;all done?
jnz next_color
mov ax,0003h
int 10h
mov ax,4c00h
int 21h
;==== END OF MAIN PROGRAM ======= ; main endp
initvesa:
;************************************
push ds
pop es
lea di,[vinfo]
mov cx,0101h
mov ax,4f01h
int 10h
;***************************************
mov ax,4f02h
mov bx,101h
int 10h
mov ax,0a000h
mov es,ax
ret
;end initvesa
define_coords:
xor cx,cx
xor si,si
again_def_c:
mov ax,640
xor dx,dx
mul cx
mov [coords+si],ax
inc si
inc si
inc cx
cmp cx,480
jb again_def_c
ret
;end of define_coords
define_window:
xor si,si
xor ax,ax
def_w1:
mov [window+si],al
inc si
cmp si,102
jbe def_w1
mov al,1
def_w2:
mov [window+si],al
inc si
cmp si,204
jbe def_w2
mov al,2
def_w3:
mov [window+si],al
inc si
cmp si,307
jbe def_w3
mov al,3
def_w4:
mov [window+si],al
inc si
cmp si,409
jbe def_w4
mov al,4
def_w5:
mov [window+si],al
inc si
cmp si,480
jb def_w5
fine:
ret
;end of define window
putpixel:
;bx=x dx=y al=col
push dx
push bx
push ax
mov si,dx
mov dl,[window+si]
add si,si
mov di,[coords+si]
add di,bx
adc dl,0
avanti1:
cmp dl,[task]
je avanti2
mov [task],dl
push ax
xor bx,bx
;***************************************************
call far [vinfo+0ch]
;****************************************************
pop ax
avanti2:
mov [es:di],al
pop ax
pop bx
pop dx
ret
;end of putpixel
;end of main
|