TIP: Click on subject to list as thread! ANSI
echo: 80xxx
to: ALL
from: PAT PRIDGEN
date: 1997-12-31 21:23:00
subject: Win95 and Com Programs

Hello,
    I'm still new to this so...I quite probably have done something
wrong. I assembled a little Birthday screen thing for a friend. I
noticed that TheDraw would save a screen in ASM, so...anyway, it runs
fine under DOS, but...on the friends machine (Win95) she says she got
some errors, and such. Here's the code. Is this a Win95 thing, or have I
made some blunder here?
; Birthday Card for Valerie, with ASM code from TheDraw
; Assembled using MASM 6.1   12-27-97 08:35pm
_TEXT SEGMENT WORD PUBLIC 'CODE'
 ASSUME cs:_TEXT, ds:_TEXT
 ORG 100h
first:
 jmp start   ; Jump over data
; TheDraw Assembler Screen Image.  Date: 12/19/97
VALERIE_BDAY_WIDTH EQU 80
VALERIE_BDAY_DEPTH EQU 25
VALERIE_BDAY_LENGTH EQU 4000
VALERIE_BDAY LABEL BYTE
        DB      ' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15,' ',15
    [mucho screen data omitted]
start:
        ;---------------------------------
        ;Clear the screen
        ;---------------------------------
 mov ah,06h   ;Scroll Window up INT 10 func 06
 mov al,00h   ;Numer of Lines (00h clear window
 mov bh,07h   ;Attribute to write blank lines
 mov ch,00h   ;upper left row of screen
 mov cl,00h   ;upper left col of screen
 mov dh,18h   ;bottom row of screen (80x25)
 mov dl,4fh   ;lower right col of screen
 int 10h
 mov ah,02h   ;Set cursor pos INT 10 func 02
 mov bh,0   ;page number
 mov dh,00h   ;top row of page
 mov dl,00h   ;first col of page
 int 10h
        mov      ax,0b800h              ;Color Video Segment
        mov      es,ax
        mov      di,0
        mov      si,offset VALERIE_BDAY
        mov      cx,2000
        cld                               ;Make MOVSW go forward.
        rep      movsw
        ;---------------------------------------------
        ;Check for a Key Press
        ;---------------------------------------------
        ;    INT 16 - KEYBOARD - CHECK FOR KEYSTROKE
        ;             AH = 01h
        ;    Return: ZF set if no keystroke available
        ;            ZF clear if keystroke available
        ;                AH = BIOS scan code
        ;                AL = ASCII character
        ;**********************************************
lp:
        mov ah, 01h
        int 16h
        jz lp        ;Jump if No Keystroke available
        ;--------------------------------
        ;Clear the Screen
        ;--------------------------------
 mov ah,06h   ;Scroll Window up INT 10 func 06
 mov al,00h   ;Numer of Lines (00h clear window
 mov bh,07h   ;Attribute to write blank lines
 mov ch,00h   ;upper left row of screen
 mov cl,00h   ;upper left col of screen
 mov dh,18h   ;bottom row of screen (80x25)
 mov dl,4fh   ;lower right col of screen
 int 10h
 mov ah,02h   ;Set cursor pos INT 10 func 02
 mov bh,0   ;page number
 mov dh,00h   ;top row of page
 mov dl,00h   ;first col of page
 int 10h
 mov ax, 4C00h  ; Exit functions with 0 in AL
 int 21h   ; Exit Program with Return Code
_TEXT ENDS
 END   first
                       Pat, pat.pridgen@svis.org
                           La Grande, Oregon
*SignIt 2.x #001* 
... Miracle Software, Inc. 'If it works, it's a Miracle!'
___ Blue Wave/DOS v2.30
--- Maximus 2.02
---------------
* Origin: THE LOFT in Auburn IN 219-925-5524 & 238-3222 HST/V34+ (1:236/7)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.