Category : Assembly Language Source Code
Archive   : VGAKIT60.ZIP
Filename : POINT.ASM

 
Output of file : POINT.ASM contained in archive : VGAKIT60.ZIP

include model.inc

;
; VGAKIT Version 6.0
;
; Copyright 1988,89,90,91,92,93,94 John Bridges
; Free for use in commercial, shareware or freeware applications
;
; POINT.ASM
;
;
.data

extrn curbk:word,adrtbl:dword,ourseg:word
extrn maxx:word,maxy:word,scanline:word

.code

extrn newbank:proc

public point
public point13x

point proc xpos:word,ypos:word,color:word
mov dx,[xpos]
cmp dx,0
jl nope1
cmp dx,[maxx]
jge nope1
mov bx,[ypos]
cmp bx,0
jl nope1
cmp bx,[maxy]
jge nope1
shl bx,1
shl bx,1
add dx,word ptr adrtbl[bx]
mov ax,word ptr adrtbl[bx+2]
adc ax,0
mov bx,dx
cmp ax,[curbk]
jz nonew
call newbank ;switch banks if a new bank entered
nonew: mov es,[ourseg] ;setup screen segment
mov al,byte ptr [color] ;get color of pixel to plot
mov es:[bx],al
nope1: ret
point endp

point13x proc xpos:word,ypos:word,color:word
mov dx,[xpos]
cmp dx,0
jl nope2
cmp dx,[maxx]
jge nope2
mov bx,[ypos]
cmp bx,0
jl nope2
cmp bx,[maxy]
jge nope2
shl bx,1
shl bx,1
mov cx,dx
shr dx,1
shr dx,1
add dx,word ptr adrtbl[bx]
mov bx,dx
mov ax,102h
and cl,3
shl ah,cl ;create bit plane mask
mov dx,3c4h
out dx,ax ;set EGA bit plane mask register
mov es,[ourseg] ;setup screen segment
mov al,byte ptr [color] ;get color of pixel to plot
mov es:[bx],al
nope2: ret
point13x endp

end



  3 Responses to “Category : Assembly Language Source Code
Archive   : VGAKIT60.ZIP
Filename : POINT.ASM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/