Last change
on this file since d2d593b was 7258c6a, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
Use standard integer types.
|
-
Property mode
set to
100644
|
File size:
642 bytes
|
Rev | Line | |
---|
[f40a309] | 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 |
|
---|
[7258c6a] | 10 | static int16_t msk[] = { 0xFF00, 0x00FF };
|
---|
[f40a309] | 11 |
|
---|
[7258c6a] | 12 | void vtext(uint16_t *obj, uint16_t nc, uint16_t row, uint16_t col, int8_t *ip)
|
---|
[f40a309] | 13 | {
|
---|
[7258c6a] | 14 | register uint16_t *op;
|
---|
[f40a309] | 15 |
|
---|
| 16 | while (*ip) {
|
---|
| 17 |
|
---|
| 18 | op = obj + ((nc >> 1) * row) + (col >> 1);
|
---|
| 19 |
|
---|
[7258c6a] | 20 | *op = (*op & (uint16_t)msk[col & 1]) |
|
---|
[f40a309] | 21 | ((*ip++ & 0x00FF) << ((col & 1) ? 8 : 0));
|
---|
| 22 |
|
---|
| 23 | col++;
|
---|
| 24 | }
|
---|
| 25 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.