source: buchla-68k/orig/IOLIB/VPUTSV.C@ 4b63bf3

Last change on this file since 4b63bf3 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Imported original source code.

  • Property mode set to 100755
File size: 1.8 KB
Line 
1/*
2 =============================================================================
3 vputsv.c -- video display string put functions
4 Version 1 -- 1988-10-06 -- D.N. Lynx Crowe
5 (c) Copyright 1988 -- D.N. Lynx Crowe
6
7 These functions drive the video character write function vputc()
8 which puts characters into a 82716 video RAM character object.
9
10 Full attribute format is assumed.
11 =============================================================================
12*/
13
14#include "stddefs.h"
15
16typedef unsigned int uint;
17
18extern int vputcv();
19
20/*
21 =============================================================================
22 vputsv(sbase, row, col, str, attrib, len)
23
24 Write string str to video RAM object pointed to by sbase
25 at (row,col) with attrib used for all characters. Line length is len.
26 =============================================================================
27*/
28
29vputsv(sbase, row, col, str, attrib, len)
30uint *sbase, row, col;
31char *str;
32uint attrib, len;
33{
34 uint c;
35
36 while (c = *str++) {
37
38 vputcv(sbase, row, col, c, attrib, len);
39
40 if (++col GE 64) {
41
42 col = 0;
43
44 if (++row GE 25)
45 row = 0;
46 }
47 }
48}
49
50/*
51 */
52
53/*
54 =============================================================================
55 vputsav(sbase, row, col, str, attrib, len)
56
57 Write string str in video RAM pointed to by sbase starting
58 at (row, col) using attributes from the words pointed to by attrib.
59 Line length is len.
60 =============================================================================
61*/
62
63vputsav(sbase, row, col, str, attrib, len)
64uint *sbase, row, col;
65char *str;
66uint *attrib, len;
67{
68 uint c;
69
70 while (c = *str++) {
71
72 vputcv(sbase, row, col, c, *attrib++, len);
73
74 if (++col GE 64) {
75
76 col = 0;
77
78 if (++row GE 25)
79 row = 0;
80 }
81 }
82}
Note: See TracBrowser for help on using the repository browser.