NewsProductsSprinterSupportDownloadSprinter ForumAbout usLinksSite map Russian site

English
   >> Software programming for the computer Sprinter
Thread views: 66 View all threadsNext thread*Threaded Mode

garrylancaster
(stranger )
2002/06/09 11:50
Screen/terminal handling Reply to this post

Hi,

I now have CamelForth up and running on the Sprinter, but I have a few problems/questions with the terminal I/O.

1. How do you enable/disable the flashing cursor?

2. I have noticed that the screen only scrolls if you output CR/LF; if other characters are output, then it wraps round to the top of the screen again. Is it possible to put the terminal into a mode where it automatically scrolls in this situation?

3. Do you have a list of control codes (I am using the DSS PUTCHAR function)? In particular, any for cursor left/right (wrapping to other lines if possible).

Thanks,

Garry

--
Garry Lancaster
http://www.z88forever.org.uk/zxplus3e/
http://www.z88forever.org.uk/

Denis ParinovVIP
(Sprinter Team)
2002/06/09 19:52
Re: Screen/terminal handling new [re: garrylancaster]Reply to this post

> 1. How do you enable/disable the flashing cursor?

Today, we haven't this feature in DSS as standard function. It will come
after DSS 2.0.
In DSS 1.xx are used following methods:

High level method.
1. printing some text at the screen.
2. printing char "_" or other cursor-style char.
3. printing control code 8 (BACKSPACE) and " " (SPACE) char for flashing
effect.


Low level method.
1. Getting current cursor coordinates.
2. Reading symbol, attr, font etc for this charplace by BIOS fn.
(WIN_GET_SYM) 'Get symbol from the screen'.
3. Replacing Font ID.
4. Writing symbol, attr and font back to the screen.

Before it. You need to prepare second font where painted cursor for each
char. (Functions 0B8h and 0B6h for get and set font.)

> 2. I have noticed that the screen only scrolls if you output CR/LF; if
other characters are output, then it wraps round to the top of the screen
again. Is it possible to put the terminal into a mode where it
automatically scrolls in this situation?

Only if you will check length of output string. DSS 1.xx can't determine
it. We will fix this feature in next versions.

> 3. Do you have a list of control codes (I am using the DSS PUTCHAR
function)? In particular, any for cursor left/right (wrapping to other
lines if possible).

DSS hasn't smart terminal. And support only five control codes:


00 NULL End of String
08 BACK BACKSPACE (Cursor left)
09 TB Tabulation
10 LF Line Feed
13 CR Cartridge Return





garrylancaster
(stranger )
2002/06/10 00:14
Re: Screen/terminal handling new [re: Denis Parinov]Reply to this post

Hi,

Thanks for your help. I have now implemented the simple terminal functions that I require, using the DSS RDCHAR/WRCHAR/SCROLL/CLEAR calls.

I am also using GETVMOD and a CURSOR/PUTCHAR/RDCHAR combination to discover the screen size and current attributes.

I set A=0 in the SCROLL call, expecting this to clear the bottom line, but this did not happen, so I had to add a CLEAR call as well. Is this a bug, or did I misunderstand the documentation?

For the cursor, I am just doing RDCHAR and then WRCHAR with all the attribute bits inverted. This gives me a solid cursor block (if over a space) or an inverted blinking character (if over a character). This is fine, but I may like to try and improve the appearance, so it is always solid or always flashing. Can you give me some information on what the attribute values represent?

Many thanks,

Garry


--
Garry Lancaster
http://www.z88forever.org.uk/zxplus3e/
http://www.z88forever.org.uk/

Denis ParinovVIP
(Sprinter Team)
2002/06/10 01:56
Re: Screen/terminal handling new [re: garrylancaster]Reply to this post

> I set A=0 in the SCROLL call, expecting this to clear the bottom line,
but this did not happen, so I had to add a CLEAR call as well. Is this a
bug, or did I misunderstand the documentation?

Unfortunately, I can't check it on Sprinter now. But source code of the
SCROLL function looks good. I will check it as soon as possible.

> For the cursor, I am just doing RDCHAR and then WRCHAR with all the
attribute bits inverted. This gives me a solid cursor block (if over a
space) or an inverted blinking character (if over a character). This is
fine, but I may like to try and improve the appearance, so it is always
solid or always flashing. Can you give me some information on what the
attribute values represent?

We use standard CGA / VGA text colors by default. It can be changed in the
palette.


Text attributes

bit 7 - Blink symbol
bits 6,5,4 - Background color (8 colors) (0...7) RGB
bits 3,2,1,0 - Ink colors (16 colors) (0...15) IRGB

Colors used for Background and Ink

0 0h 0000b - Black
1 1h 0001b - Blue
2 2h 0010b - Green
3 3h 0011b - Cyan
4 4h 0100b - Red
5 5h 0101b - Magenta
6 6h 0110b - Brown
7 7h 0111b - White

Colors used for Ink only

8 8h 1000b - Gray
9 9h 1001b - Bright Blue
10 Ah 1010b - Bright Green
11 Bh 1011b - Bright Cyan
12 Ch 1100b - Bright Red
13 Dh 1101b - Bright Magenta
14 Eh 1110b - Yellow
15 Fh 1111b - Bright White






View all threadsNext thread*Threaded Mode
Jump to