source: buchla-68k/orig/IOLIB/VPUTS.C@ a838f5b

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

Imported original source code.

  • Property mode set to 100755
File size: 1.7 KB
RevLine 
[3ae31e9]1/*
2 =============================================================================
3 vputs.c -- video display string put functions
4 Version 2 -- 1987-03-30 -- D.N. Lynx Crowe
5 (c) Copyright 1987 -- 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 vputc();
19
20/*
21 =============================================================================
22 vputs(sbase, row, col, str, attrib)
23
24 Write string str to video RAM object pointed to by sbase
25 at (row,col) with attrib used for all characters.
26 =============================================================================
27*/
28
29vputs(sbase, row, col, str, attrib)
30uint *sbase, row, col, attrib;
31char *str;
32{
33 uint c;
34
35 while (c = *str++) {
36
37 vputc(sbase, row, col, c, attrib);
38
39 if (++col GE 64) {
40
41 col = 0;
42
43 if (++row GE 25)
44 row = 0;
45 }
46 }
47}
48
49/*
50 */
51
52/*
53 =============================================================================
54 vputsa(sbase, row, col, str, attrib)
55
56 Write string str in video RAM pointed to by sbase starting
57 at (row, col) using attributes from the words pointed to by attrib.
58 =============================================================================
59*/
60
61vputsa(sbase, row, col, str, attrib)
62uint *sbase, row, col, *attrib;
63char *str;
64{
65 uint c;
66
67 while (c = *str++) {
68
69 vputc(sbase, row, col, c, *attrib++);
70
71 if (++col GE 64) {
72
73 col = 0;
74
75 if (++row GE 25)
76 row = 0;
77 }
78 }
79}
Note: See TracBrowser for help on using the repository browser.