Dec 092017
 
ASM4QC is a library of assembly language functions that are designed to be called from programs written in C. These functions provide high performance, low level video routines designed for text mode applications.
File ASM4QC.ZIP from The Programmer’s Corner in
Category C Source Code
ASM4QC is a library of assembly language functions that are designed to be called from programs written in C. These functions provide high performance, low level video routines designed for text mode applications.
File Name File Size Zip Size Zip Type
ASM4QC.DIZ 346 240 deflated
ASM4QC.DOC 50000 10128 deflated
ASM4QC.H 4070 1226 deflated
ASM4QCC.LIB 8239 4285 deflated
ASM4QCL.LIB 8239 4350 deflated
ASM4QCM.LIB 8239 4342 deflated
ASM4QCS.LIB 8239 4291 deflated
DEMO4QC.C 15369 4019 deflated
DEMO4QC.EXE 9995 6051 deflated
GETKEY.COM 304 285 deflated

Download File ASM4QC.ZIP Here

Contents of the ASM4QC.DOC file

















ASM4QC, Assembly routines for QuickC
Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)
Redistributed by permission


Program documentation
Updated December 1, 1990









Table of Contents:

1.0 Read this Section First......................2
2.0 Overview of this Package.....................2
3.0 Using ASM4QC.................................3
4.0 Conventions Used in Function Descriptions....4
5.0 Complete Function Descriptions...............5
6.0 Product Support.............................27
























Page 1 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)





1.0 Read this Section First:
This section contains important information regarding this
package.

1.1 ASM4QC 2.02 is now distributed as freeware. Although it
still retains its copyright, you are free to use and
distribute ASM4QC as long as no fee is charged (with the
exception of a reasonable distribution fee). If you would
like to obtain complete source code for all of the library
routines, send $29.00 plus $3.00 shipping (California
residents add local sales tax) to the following address
(See the ORDRFORM file). IMPORTANT: SoftCircuits reserves
all rights to the source code and it may not be distributed
in an uncompiled form under any circumstances. Send orders
to:

SoftCircuits Programming
P.O. Box 16262
Irvine, CA 92713

1.2 ASM4QC functions were developed for use with Microsoft
QuickC, Microsoft C, and Borland International's Turbo C.
They should work with any compatible C compiler using the
small, medium, compact, or large memory model running on an
IBM-standard personal computer.

1.3 While error checking is an important part any computer
program, it can compromise performance and limit
flexibility. Since ASM4QC functions were designed to be as
fast as possible, they assume that the programmer knows
what he or she is doing and may behave unpredictably if
invalid arguments are received. The programmer is
responsible for deciding if error checking is needed and,
if so, implementing it.

1.4 ASM4QC routines use variables that must first be
initialized before many of the functions can work
correctly. This is done by calling the initvideo() function
at the beginning of each program. See the description for
initvideo() in section 5.0 for additional information.

2.0 Overview of this Package:
ASM4QC is a library of assembly language functions that are
designed to be called from programs written in C. These
functions provide high performance, low level video routines
designed for text mode applications.

2.1 To view a demonstration of some ASM4QC functions, you can
run the DEMO4QC.EXE program included in this package.

2.2 Using ASM4QC functions in your C programs provides the
following advantages:



Page 2 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)




2.2.1 You can quickly and easily code professional video
routines that would be very time consuming and/or
impossible with C alone.

2.2.2 Since these routines have been written in assembly
language and meticulously optimized for both speed
and efficiency, they race at the fastest speed
possible on your computer while adding very little
to the size of the resulting executable file.

2.3 Note that ASM4QC is not meant to replace the graphics
library that is included with QuickC. The QuickC graphics
library is a powerful set of graphics functions which have
limited use in text mode applications. In addition, the
size of your executable file will be increased considerably
if the QuickC library is included in your program.

2.4 The ASM4QC package contains the following files:

ASM4QCS.LIB -- ASM4QC library (small memory model)
ASM4QCM.LIB -- ASM4QC library (medium memory model)
ASM4QCC.LIB -- ASM4QC library (compact memory model)
ASM4QCL.LIB -- ASM4QC library (large memory model)
ASM4QC.H -- ASM4QC header file
ASM4QC.DOC -- Documentation (this file)
DEMO4QC.EXE -- ASM4QC demo program
DEMO4QC.C -- DEMO4QC C source code
GETKEY.COM -- Getkey() utility

If you purchased the source code, the following files are
also included:

ASM4QC.INC -- Assembly language include file
DATA4QC.ASM -- Global data management routines
STDVIDEO.ASM -- Standard video routines
EXTVIDEO.ASM -- Extended video routines
WINDOW.ASM -- Windowing routines
KBDIO.ASM -- Keyboard input/output routines
MAKEFILE -- Assembler make file

3.0 Using ASM4QC:
This section outlines the recommended method for developing C
programs that use ASM4QC functions.

3.1 The first step is to make the ASM4QC library part of your
program list (or project file). You must be sure to use the
ASM4QC library that corresponds to the memory model being
used by your compiler (see section 2.4) or your program
will fail.

3.2 If you are using QuickC version 1.0, be sure to turn on
screen swapping inside the debug menu.




Page 3 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)




3.3 Be sure to include the ASM4QC header file. Your programs
can now call ASM4QC functions the same way they would call
any C function. You should always call initvideo() before
calling any other ASM4QC function. Section 5.0 gives a
complete description of each function and shows the
arguments that each function receives and returns.

3.4 If you would like to add formatting to ASM4QC print
functions (like that provided with printf()), you can
create the following printsaf() function. It accepts
arguments identical to those accepted by printf(), and uses
an ASM4QC function to write to the screen.

#include
#include "asm4qc.h"

void printsaf(va_list arg_list, ...)
{
va_list arg_ptr;
char *format;
char buffer[81]; /* Increase this value if strings */
/* might be longer than 80 chars */
va_start(arg_ptr,arg_list);
format = arg_list;
vsprintf(buffer,format,arg_ptr);
printsa(buffer); /* use printsa to write string */
}

4.0 Conventions Used in Function Descriptions:
Section 5.0 gives a complete description of each function in
alphabetical order. This section describes the conventions used
in those descriptions.

4.1 Module:
Names the assembly source code module and object module
that define the function.

4.2 #include:
Names the header file that declares the function. The
header file should be included to insure proper prototyping
and definitions.

4.3 Prototype:
Shows how the prototype of the function appears in the
specified include file. It shows the types of values that
the function accepts and returns.

4.4 Usage:
This serves as a descriptive quick reference to the
arguments the function accepts and returns.

4.5 Description:
Describes the operation of the function.



Page 4 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)




4.6 Return value:
Describes the value that the function returns, if any.

4.7 Example:
Examples are sometimes included to illustrate the use of a
function.

4.8 Also see:
Lists references to additional information that is relevant
to the function.


5.0 Complete Function Descriptions:

beep() - Beep:

Module: kbdio
#include "asm4qc.h"

Prototype:
void beep(int,int);

Usage:
beep(frequency,duration);

Description:
Sounds the computer's internal speaker. frequency specifies the
frequency of the tone in hertz (cycles per second). duration
specifies the tone duration in 18ths of a second (a duration of
18 is about 1 second). Note that frequency and duration are not
affected by different computer speeds. Note that beep() accepts
integer arguments only. Real numbers (such as 4.5) will cause
unpredictable results.

Return value:
No return value.


biosprintsa() - BIOS print string with attribute:

Module: stdvideo
#include "asm4qc.h"

Prototype:
void biosprintsa(char *);

Usage:
biosprintsa("This is a string");








Page 5 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)




Description:
This function uses ROM BIOS to write a string to the screen
starting at the position of the text cursor. The string is
written using the current color attribute. No formatting, as in
printf(), is provided. However, biosprintsa() gives special
treatment to the following escape sequences:

\a Alert (beep) \t Tab
\b Backspace \' Single quote
\n New line (CR-LF) \" Double quote
\r Carriage return \\ Backslash

\xdd ASCII dd, where dd is a hexadecimal number.
\ddd ASCII ddd, where ddd is an octal number.

In contrast, the printsa() function would only print the ASCII
character that results from the escape sequence. However,
printsa() is much faster.

Return value:
No return value.

Also see:
color(), setcurs().


cls() - Clear screen:

Module: stdvideo
#include "asm4qc.h"

Prototype:
void cls(void);

Usage:
cls();

Description:
This function clears the entire screen using the default color
attribute. If you want to clear only a portion of the screen,
use the scroll() function. If you want to set the color of the
screen border, use setborder().

Return value:
No return value.

Also see:
scroll(), setborder(), color().


_color(), color() - Set default color:

Module: data4qc
#include "asm4qc.h"


Page 6 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)





Prototype:
int _color(int);
#define color(f,b) _color(foreback(f,b))

Usage:
previous_color = _color(attribute);
previous_color = color(foreground,background);

Description:
Sets the default color attribute. The color() macro accepts a
foreground and background argument, while _color() requires a
single, combined attribute value.

ASM4QC.H defines the following color constants:

BLACK BLUE GREEN CYAN RED
MAGENTA YELLOW WHITE BOLD BLINKING

BOLD and BLINKING are only valid for foreground colors. You can
combine them with the plus sign (ex: BOLD+BLINKING+YELLOW). The
default color attribute will be WHITE,BLACK until your program
changes it.

Return value:
This function returns the previous color attribute combined into
a single attribute value. This makes it possible for functions
to change the default color and then restore it when they are
finished.

Example:
This example sets the default color attribute to bright white
characters on a blue background. It then clears the screen and
prints a message.

#include "asm4qc.h"

main()
{
initvideo(); /* always call this first */
color(BOLD+WHITE,BLUE); /* set color */
cls(); /* clear the screen */
setvoff(1,1); /* position logical cursor */
prints("Hello world"); /* display message */
}

Also see:
foreback(), setbackcolor(), setforecolor().


curscol() - Get cursor column:

Module: stdvideo
#include "asm4qc.h"


Page 7 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)





Prototype:
int curscol(void);

Usage:
cursor_column = curscol();

Description:
This function returns the current cursor column.

Return value:
The current cursor column.

Also see:
cursrow(), setcurs(), voffcol().


cursrow() - Get cursor row:

Module: stdvideo
#include "asm4qc.h"

Prototype:
int cursrow(void);

Usage:
cursor_row = cursrow();

Description:
This function returns the current cursor row.

Return value:
The current cursor row.

Also see:
curscol(), setcurs(), voffrow().


edstring() - Edit string:

Module: kbdio
#include "asm4qc.h"

Prototype:
int edstring(char *,int);

Usage:
actual_length = edstring(string_buffer,max_length);

Description:
This function is identical to kbded() except that kbded() always
clears string_buffer before allowing input, and edstring()
allows you to edit the original contents of string_buffer. See
kbded() for more information.


Page 8 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)





Return value:
Length of the entered string (not counting the return key or
terminating null), or -1 if the user pressed escape.

Also see:
initvideo(), kbded().


foreback() - Get attribute from foreground and background arguments:

#include "asm4qc.h"

Prototype:
#define foreback(f,b)
((f & 0x0F) | ((f & 0x10) << 3) | ((b & 0x07) << 4));

Usage:
color_attribute = foreback(foreground,background);

Description:
The foreback() macro can be used as an argument to any function
that requires a single color attribute value. It allows you to
specify the foreground and background colors as separate
arguments. See color() for valid arguments.

Return value:
The combined color attribute value.

Also see:
color(), setbackcolor(), setforecolor().


frame() - Draw frame:

Module: extvideo
#include "asm4qc.h"

Prototype:
void frame(int,int,int,int);

Usage:
frame(top,bottom,left,right);

Description:
This function draws a frame on the screen using the current
color attribute. The arguments define the frame coordinates.
Note that the top row and left-most column are specified with 1
and not 0.

Return value:
No return value.




Page 9 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)




Also see:
initvideo(), color(), setframetype().


getkey(), getasciicode(), getscancode() - Get keystroke:

Module: kbdio
#include "asm4qc.h"

Prototype:
int getkey(void);
#define getasciicode() (getkey() & 0x00FF)
#define getscancode() (getkey() >> 8)

Usage:
key_pressed = getkey();
ascii_code = getasciicode();
scan_code = getscancode();

Description:
The getkey() function retrieves a keystroke from the keyboard.
It is most effective when accessing control keys because it
returns them in a single call, whereas getch() requires two
calls to retrieve extended keys. getkey() returns the scan code
in the upper byte, and the ASCII code in the lower byte.

The GETKEY.COM utility program can be used to display the return
code, as returned by getkey(), for any key pressed. ASM4QC.H
defines constants for many control keys and also defines the
getasciicode() and getscancode() macros, which are variations of
getkey(). getasciicode() returns just the ASCII code, or 0 if a
control key was pressed, and getscancode() returns only the
key's scan code.

Return value:
Keyboard character as explained above.

Also see:
kbdflush().


getvconfig() - Get video configuration

Module: data4qc
#include "asm4qc.h"

Prototype:
void getvconfig(struct vconfig *);

Usage:
struct vconfig vdata; /* declare structure of type vconfig */
getvconfig(&vdata);




Page 10 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)




Description:
This function returns information about the current video
configuration. The argument is the address of a structure of
type vconfig which is defined in the ASM4QC.H header file. Note
that the values placed in the structure describe the video
configuration at the time initvideo() was last called.

On return, the structure contains the following values:
vdata.vsegment - Video segment used by ASM4QC
vdata.vmode - Video mode
vdata.vpage - Video page
vdata.textrows - Number of text rows
vdata.textcols - Number of text columns
vdata.snowcheck - Snow checking (1 = enabled, 0 = disabled)
vdata.vcombo - Video display combination code

Video display combination codes:
0 - No display
1 - MDA w/mono display
2 - CGA w/color display
3 - (not used)
4 - EGA w/color display
5 - EGA w/mono display
6 - PGA w/color display
7 - VGA w/analog mono display
8 - VGA w/analog color display
9 - (not used)
10 - (not used)
11 - MCGA w/analog mono display
12 - MCGA w/analog color display
-1 - Unknown display combination

Return value:
No return value.

Example:
This example reports information about the current display
configuration:

#include
#include "asm4qc.h"

struct vconfig vdata; /* declare vconfig structure */

main()
{
initvideo(); /* always call this first */
getvconfig(&vdata); /* remember to pass address */

printf("Video segment: %04X\n",vdata.vsegment);
printf("Video mode: %d\n",vdata.vmode);
printf("Video page: %d\n",vdata.vpage);
printf("Number of rows: %d\n",vdata.textrows);
printf("Number of columns: %d\n",vdata.textcols);


Page 11 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)




printf("Snow checking: %d\n",vdata.snowcheck);
printf("Display combination: %d\n",vdata.vcombo);
}

Also see:
initvideo().


hidecurs() - Hide cursor:

Module: stdvideo
#include "asm4qc.h"

Prototype:
void hidecurs(void);

Usage:
hidecurs();

Description:
This function hides the text cursor without changing its size or
location. The cursor can later be restored with restorecurs().

Return value:
No return value.

Also see:
restorecurs(), setcurs().


hscroll() - Horizontal scroll:

Module: extvideo
#include "asm4qc.h"

Prototype:
void hscroll(int,int,int,int,int);

Usage:
hscroll(columns,top,bottom,left,right);

Description:
This function works exactly like scroll() except that hscroll()
scrolls from side to side. columns specifies the number of
columns that the contents of the window will be scrolled. If
columns is positive, the text is scrolled left. If columns is
negative, the text is scrolled right. If columns is 0, the
window is cleared. When you only need to clear a window, it is
preferable to use scroll() because scroll() is noticeable
faster, especially when snow checking is enabled. See scroll()
for additional information.

Return value:
No return value.


Page 12 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)





Also see:
initvideo(), scroll(), color().


initvideo() - Initialize video:

Module: data4qc
#include "asm4qc.h"

Prototype:
int initvideo(void);

Usage:
is_color = initvideo();

Description:
ASM4QC routines use variables that must first be initialized
before many of the functions can work correctly. initvideo()
initializes these variables. Your programs should always call
initvideo() before calling any other ASM4QC function.
initvideo() should also be called after any changes are made to
the display environment.

Returns:
This function returns TRUE (1) if the video hardware supports
color, or FALSE (0) to indicate that color is not supported.
Note that a composite monitor using a color graphics adapter
will cause initvideo() to return TRUE even though composite
monitors are unable to display color. For this reason, it is
recommended that your programs allow users with composite
monitors to suppress color in your programs. This is exactly
what QuickC's /b option does.

Also see:
getvconfig(), setsnowcheck(), setvsegment()


kbded() - Keyboard editor:

Module: kbdio
#include "asm4qc.h"

Prototype:
int kbded(char *,int);

Usage:
actual_length = kbded(string_buffer,max_length);








Page 13 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)




Description:
Allows the user to enter and edit keyboard input. max_length
specifies the maximum string length to be accepted. The entered
string will be placed in string_buffer. It is the programmers
responsibility to see that string_buffer is large enough to hold
a string of max_length + 1 (the terminating null). kbded() makes
use of the following editing keys:

Text characters keys Home
Backspace End
Return Left
Escape Right
Delete Control-left
Insert Control-right

The input is echoed to the screen at the location of the text
cursor. If escaped is pressed, kbded() returns -1 and a null
string in string_buffer. kbded() always starts by filling
string_buffer with ASCII zeros. If you want to edit a buffer
without first erasing its contents, use edstring().

Return value:
Length of entered string (not counting the return key or
terminating null), or -1 if the user pressed escape.

Also see:
edstring(), initvideo(), setcurs().


kbdflush() - Keyboard flush:

Module: kbdio
#include "asm4qc.h"

Prototype:
void kbdflush(void);

Usage:
kbdflush();

Description:
This function flushes out any keystrokes waiting in the keyboard
buffer.

Return value:
No return value.

Also see:
getkey().







Page 14 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)




pause() - Suspend program execution:

Module: kbdio
#include "asm4qc.h"

Prototype:
void pause(int);

Usage:
pause(duration);

Description:
This function simply suspends program execution for the length
of time specified by the duration argument. Each 18 counts of
duration is equal to about 1 second. The length of time is not
affected by different computer speeds. Note that pause() accepts
integer arguments only. Real numbers (such as 4.5) will cause
unpredictable results.

Return value:
No return value.


printa() - Print attribute:

Module: extvideo
#include "asm4qc.h"

Prototype:
void printa(int,int);

Usage:
printa(color,count);

Description:
This function is ideal for creating a moving highlight bar for
menus. It writes a color to the screen without changing the text
it covers. The color is specified by the color argument. The
starting location is specified by the video offset (see
setvoff()) and the number of columns covered is specified by the
count argument. The foreback() macro can be used as the color
argument.

Return value:
No return value.

Also see:
foreback(), initvideo(), setvoff().


prints() - Print string:

Module: extvideo
#include "asm4qc.h"


Page 15 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)





Prototype:
void prints(char *);

Usage:
prints("This is a string");

Description:
This function will write a string to the screen in much the same
way as printsa(), only this function writes the string using the
color attribute that's already at that screen location. See
printsa() for additional information.

Return value:
No return value.

Also see:
initvideo(), printsa(), setvoff().


printsa() - Print string with attribute:

Module: extvideo
#include "asm4qc.h"

Prototype:
void printsa(char *);

Usage:
printsa("This is a string");

Description:
This function writes a string to the screen using the current
color attribute. This function provides exceptional performance
by writing directly into video RAM. The string will be written
to the location specified by the video offset value (see
setvoff()). No formatting, as in printf(), is provided. Note
that printsa() is not affected by, nor does it affect the actual
text cursor.

Return value:
No return value.

Also see:
initvideo(), color(), setvoff().


reada() - Read attribute:

Module: extvideo
#include "asm4qc.h"

Prototype:
int reada(int,int);


Page 16 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)





Usage:
attribute = reada(row,column);

Description:
This function returns the attribute at the screen location
specified by row, column.

Return value:
The attribute as described above.

Also see:
initvideo(), readc().


readc() - Read character:

Module: extvideo
#include "asm4qc.h"

Prototype:
char readc(int,int);

Usage:
character = readc(row,column);

Description:
This function returns the character at the screen location
specified by row, column.

Return value:
The character as described above.

Also see:
initvideo(), reada().


repch() - Repeat character:

Module: stdvideo
#include "asm4qc.h"

Prototype:
void repch(char,int);

Usage:
repch(character,count);

Description:
This function prints one character to the screen at the location
of the text cursor. The character is repeated for the number of
times specified by the count argument and is written using the
current color attribute. Note that this function does not update
the position of the text cursor.


Page 17 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)





Return value:
No return value.

Also see:
color(), setcurs().


restorecurs() - Restore cursor:

Module: stdvideo
#include "asm4qc.h"

Prototype:
void restorecurs(void);

Usage:
restorecurs();

Description:
This function restores the text cursor after it was hidden by
the hidecurs() function.

Return value:
No return value.

Also see:
hidecurs().


restorewin() - Restore window:

Module: window
#include "asm4qc.h"

Prototype:
void restorewin(int *,int,int,int,int);

Usage:
restorewin(buffer,top,bottom,left,right);

Description:
This function restores the section of screen specified by the
last 4 arguments with the contents of buffer. buffer should have
previously been used in a call to savewin().

Return value:
No return value.

Also see:
initvideo(), savewin().





Page 18 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)




savewin() - Save window:

Module: window
#include "asm4qc.h"

Prototype:
void savewin(int *,int,int,int,int);

Usage:
savewin(buffer,top,bottom,left,right);

Description:
This function saves the section of screen specified by the last
4 arguments. The section of screen can be as small as 1
character. Note that the top row and left-most column are
specified with 1 and not 0. The data will be stored in buffer.
savewin() can be used prior to creating a pop-up window. The
pop-up window can then be closed by restoring the contents of
the buffer back to the screen using restorewin().

It is the programmers responsibility to see that buffer is large
enough to hold the contents of the window, and that the window
coordinates are valid. Not doing so may cause the program to
fail. The buffer should be of type int, and the number of
elements needed is equal to:

((bottom - top) + 1) * ((right - left) + 1)

Return value:
No return value.

Example:
This example creates a pop-up window that displays a message
until the user presses a key.

#include "asm4qc.h"

#define TOP 5
#define BOTTOM 9
#define LEFT 27
#define RIGHT 56

/* declare buffer to hold information under the window */
int buffer[((BOTTOM - TOP) + 1) * ((RIGHT - LEFT) + 1)];

main()
{
/* create bold white characters on blue */
/* if display supports color */
if(initvideo())
color(BOLD+WHITE,BLUE);

/* save information under window */
savewin(buffer,TOP,BOTTOM,LEFT,RIGHT);


Page 19 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)





/* clear the window */
scroll(0,TOP,BOTTOM,LEFT,RIGHT);

/* put a double frame around the window */
frame(TOP,BOTTOM,LEFT,RIGHT);

/* print message */
setvoff(TOP+2,LEFT+7);
prints("Hello world");

getkey(); /* wait till user presses a key */

/* close the window */
restorewin(buffer,TOP,BOTTOM,LEFT,RIGHT);
}

Also see:
initvideo(), restorewin().


scroll() - Scroll window:

Module: stdvideo
#include "asm4qc.h"

Prototype:
void scroll(int,int,int,int,int);

Usage:
scroll(lines,top,bottom,left,right);

Description:
The last 4 arguments specify the coordinates of a window on the
screen. Note that the top row and left-most column are specified
with 1 and not 0. The contents of this window will be scrolled
the number of lines specified by the lines argument. If lines is
a positive value, then the window will scroll up. If lines is
negative, then the window will scroll down. If lines is 0, then
the window will be cleared. The current color attribute
specifies the color of the new lines scrolled into the window if
it is scrolled, or the color attribute of the entire window if
it is cleared. To scroll horizontally, use hscroll().

Return value:
No return value.

Also see:
hscroll(), color().







Page 20 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)




setborder() - Set screen border:

Module: stdvideo
#include "asm4qc.h"

Prototype:
void setborder(void);

Usage:
setborder();

Description:
This function sets the color of the screen border to the current
background color.

Return value:
No return value.

Also see:
color().


setcurs() - Set cursor position:

Module: stdvideo
#include "asm4qc.h"

Prototype:
void setcurs(int,int);

Usage:
setcurs(row,column);

Description:
The setcurs() function positions the text cursor. The arguments
specify the screen coordinates that the cursor is to be placed,
where 1,1 specifies the top, left corner of the screen.

Return value:
No return value.

Also see:
curscol(), cursrow(), hidecurs(), restorecurs(), setvoff().


setbackcolor() - Set default background color:

Module: data4qc
#include "asm4qc.h"

Prototype:
int setbackcolor(int);




Page 21 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)




Usage:
previous_background = setbackcolor(background);

Description:
This function sets the default background color.

Return value:
Returns the previous background color.

Also see:
color(), foreback(), setforecolor().


setdefvenv() - Set default video environment:

Module: data4qc
#include "asm4qc.h"

Prototype:
int setdefvenv(void);

Usage:
mode_was_reset = setdefvenv();

Description:
This function examines the current video environment. If it
finds the default text mode, video page 0, 25 text rows and 80
text columns, then it simply returns FALSE (0). Otherwise it
resets the video environment to the default text mode, calls
initvideo(), and returns TRUE (1). Important: initvideo() must
have previously been called in order for this function to work
reliably.

Return value:
Returns TRUE (1) if the video mode was reset, FALSE (0)
otherwise.

Also see:
initvideo().


setforecolor() - Set default foreground color:

Module: data4qc
#include "asm4qc.h"

Prototype:
int setforecolor(int);

Usage:
previous_foreground = setforecolor(foreground);

Description:
This function sets the default foreground color.


Page 22 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)





Return value:
Returns the previous foreground color.

Also see:
color(), foreback(), setbackcolor().


setframetype(), setdoubleframe(), setsingleframe() - Set frame type:

Module: extvideo
#include "asm4qc.h"

Prototype:
void setframetype(char,char,char,char,char,char);
#define setdoubleframe() \
setframetype('\xCD','\xBA','\xC9','\xBB','\xC8','\xBC')
#define setsingleframe() \
setframetype('\xC4','\xB3','\xDA','\xBF','\xC0','\xD9')

Usage:
setframetype(top,side,topleft,topright,bottomleft,bottomright);
setdoubleframe();
setsingleframe();

Description:
The frame() function creates a double line border by default.
setframetype() allows you to customize the characters used by
the frame() function. The setdoubleframe() and setsingleframe()
macros can be used to set standard frame types.

Return value:
No return value.

Also see:
frame().


setsnowcheck() - Set snow check status:

Module: data4qc
#include "asm4qc.h"

Prototype:
void setsnowcheck(int);

Usage:
setsnowcheck(OFF);








Page 23 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)




Description:
The IBM Color Graphics Adapter will snow (flicker spots
randomly) if video memory is accessed too quickly. When snow
checking is enabled, ASM4QC functions slow down in a manner that
eliminates snow. initvideo() automatically enables snow checking
if it determines that a CGA is the active adapter.

Since a number of CGA adapters don't snow, and some users might
not mind snow, setsnowcheck() provides a way for your programs
to disable snow checking. A non-zero argument enables snow
checking and a zero argument disables it. You can use the ON or
OFF constants, defined in ASM4QC.H, as arguments. Calling this
function with a non-zero argument is generally not recommended
because snow checking slows down many ASM4QC functions and will
cause unpredictable results if enabled on monochrome systems.

Return value:
No return value.

Also see:
initvideo(),


setvmode() - Set video mode:

Module: stdvideo
#include "asm4qc.h"

Prototype:
int setvmode(int);

Usage:
previous_video_mode = setvmode(video_mode);

Description:
This function sets the video mode. Be sure to run initvideo()
again after changing the video mode.


Return value:
Returns the previous video mode.

Also see:
initvideo(), vmode().


setvoff() - Set video offset:

Module: data4qc
#include "asm4qc.h"

Prototype:
void setvoff(int,int);




Page 24 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)




Usage:
setvoff(row,column);

Description:
This function sets the video offset for ASM4QC functions that
write directly to video memory. The video offset works like a
logical cursor. The row and column arguments function exactly
the same as setcurs(), where 1,1 is the upper, left corner of
the screen. Note that setvoff() does not affect, and is not
affected by, the actual text cursor.

Return value:
No return value.

Also see:
setcurs(), voffcol(), voffrow().


setvsegment() - Set video segment:

Module: data4qc
#include "asm4qc.h"

Prototype:
int setvsegment(int);

Usage:
previous_vsegment = setvsegment(vsegment);

Description:
This function sets the video segment for ASM4QC functions that
write directly into video memory. initvideo() will automatically
set the video segment according to the video hardware
configuration. setvsegment() can be used to override this value.
You can use either of two constants defined in ASM4QC.H as an
argument to this function. They are COLOR_SEG and MONO_SEG, and
they contain the video segment for color and monochrome text
modes respectively.

Return value:
The previous video segment value.

Also see:
initvideo().


vmode() - Video mode:

Module: stdvideo
#include "asm4qc.h"

Prototype:
int vmode(void);



Page 25 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)




Usage:
video_mode = vmode();

Description:
This function returns the current video mode.

Return value:
The current video mode.

Also see:
setvmode().


voffcol() - Video offset column:

Module: stdvideo
#include "asm4qc.h"

Prototype:
int voffcol(void);

Usage:
video_offset_col = voffcol();

Description:
This function returns the column coordinate of the current
logical cursor (video offset).

Return value:
The current video offset column.

Also see:
curscol(), cursrow(), setvoff(), voffrow().


voffrow() - Video offset row:

Module: stdvideo
#include "asm4qc.h"

Prototype:
int voffrow(void);

Usage:
video_offset_row = voffrow();

Description:
This function returns the row coordinate of the current logical
cursor (video offset).

Return value:
The current video offset row.




Page 26 of 27




ASM4QC, Version 2.02, Copyright (c) 1989-90 SoftCircuits (tm)




Also see:
curscol(), cursrow(), setvoff(), voffcol().


vpage() - Video page:

Module: stdvideo
#include "asm4qc.h"

Prototype:
int vpage(void);

Usage:
video_page = vpage();

Description:
This function returns the current video page.

Return value:
The current video page.



6.0 Product Support:
Your questions and comments can be sent to the address below. We
are unable to provide phone support at this time, but your
questions and comments are very important to us and we are
committed to providing knowledgeable support in a timely manner.

If you think you've found a problem with ASM4QC, please include
as much information as you can (version number, etc.). If
possible, send us a copy of your C source code that causes the
problem. Thank you for your support!

SoftCircuits Programming
P.O. Box 16262
Irvine, CA 92713




















Page 27 of 27




 December 9, 2017  Add comments

Leave a Reply