source: buchla-68k/vlib/vtext.c@ 0170798

Last change on this file since 0170798 was b28a12e, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Zero redundant declarations.

  • Property mode set to 100644
File size: 660 bytes
Line 
1/*
2 =============================================================================
3 vtext.c -- output a text string to the VSDD in 1 byte / character mode
4 Version 3 -- 1987-06-02 -- D.N. Lynx Crowe
5
6 Assumes VSDD is pointing at bank 0.
7 =============================================================================
8*/
9
10#include "ram.h"
11
12static int16_t msk[] = { 0xFF00, 0x00FF };
13
14void vtext(uint16_t *obj, uint16_t nc, uint16_t row, uint16_t col, int8_t *ip)
15{
16 register uint16_t *op;
17
18 while (*ip) {
19
20 op = obj + ((nc >> 1) * row) + (col >> 1);
21
22 *op = (*op & (uint16_t)msk[col & 1]) |
23 ((*ip++ & 0x00FF) << ((col & 1) ? 8 : 0));
24
25 col++;
26 }
27}
Note: See TracBrowser for help on using the repository browser.