Doc changes.

This commit is contained in:
Patrick Kloepfer 2020-02-09 15:08:15 -05:00
parent 688a9857a6
commit 2d001b9351
4 changed files with 42 additions and 2 deletions

View File

@ -334,7 +334,7 @@ Consult the subsection below on Advanced Display Techniques for more examples of
A2osX provides advanced screen handling capabilities for the Apple console (keyboard/screen) as well as terminals connected directly (via Super Serial Cards) or remotely (via Telnet using a supported network card and the **telnetd** server daemon). These features are based on the VT100 Terminal definition and scripts you develop can pass VT100 codes (via the **echo** command) to enhance the appearance of your scripts. In addition to VT100 codes, **echo** has been augmented with some short codes to perform the more common and to help display special characters. The examples below will help you understand what is possible with **echo**. For a fuller listing of the available VT100 Terminal Codes, consult the **[A2osX Terminal Codes Guide](.Docs/TERM.md).**
#!/bin/sh
#!/bin/sh
# ECHO / Advanced Display Techniques Examples
# Note codes are CASE SENSITVE. \F is not the same as \f
# Clear the Screen (\f)
@ -342,7 +342,7 @@ A2osX provides advanced screen handling capabilities for the Apple console (keyb
# Clear the Screen and Display text in the top left corner
echo "\fThis line will appear on the first line of your Apple"
# ECHO on a line byself will create a blank line (moving the cursor down one line)
# Multiple ECHOs in a row, will skip multiple lines. The \n shortcode makes this easier.
# Multiple ECHOs in a row, will skip multiple lines. The \n shortcode makes this easier.
# This example is the same as ECHO; ECHO; ECHO "HELLO"; ECHO; ECHO; ECHO "WORLD"
echo "\n\nHELLO\n\nWORLD"
# Backspace shortcode \b moves the cursor one space to the left.
@ -383,6 +383,38 @@ A2osX provides advanced screen handling capabilities for the Apple console (keyb
# Clear line 15
echo \e[15;01H\e[2K
In addition to the special codes above that can used to manage all displays (both the console and remotely connected users), there are additional codes that have great affect on VT-100 terminals and emulators such as putty. Only the reverse video option works on an Apple II console/screen.
#!/bin/sh
# ECHO / VT100 Terminal Character Codes
# Note codes are CASE SENSITVE. \F is not the same as \f
# Turn BOLD on: \e[1m off: \e[0m
# This example displays HELLO BOLD WORLD with the word BOLD in bold.
echo "HELLO \e[1mBOLD\e[0m WORLD"
# Turn low intensity on: \e[2m off: \e[0m
# This example displays HELLO low WORLD with the word low in low intesity.
echo "HELLO \e[2mlow\e[0m WORLD"
# Turn underline on: \e[4m off: \e[0m
# This example displays HELLO underline WORLD with the underline underlined.
echo "HELLO \e[4mlow\e[0m WORLD"
# Turn blinking on: \e[5m off: \e[0m
# This example displays HELLO blinking WORLD with the blinking blinking.
echo "HELLO \e[5mblinking\e[0m WORLD"
# Turn Inverse on: \e[7m off: \e[0m
# This example displays HELLO INVERSE WORLD with the word INVERSE in inverse.
echo "HELLO \e[7mINVERSE\e[0m WORLD"
# Turn Invisible on: \e[8m off: \e[0m
# This example displays HELLO Invisible WORLD with the word Invisible is not displayed (blank spaces).
echo "HELLO \e[8mInvisible\e[0m WORLD"
# Change Character Color: \e[COLOR;COLORm
# This example displays HELLO COLOR WORLD with the word COLOR in Bright Yellow on a Dark Blue Background.
echo "HELLO \e[7mINVERSE\e[0m WORLD"
As you can see \e[0m turns off all character attributes. It is like a reset. The following table shows color codes that can be used with VT-100 emulators like PuTTY.
![image](https://user-images.githubusercontent.com/180313/70875571-5fb40980-1f84-11ea-8b2a-f537fce6c07c.png)
### ELSE
else

View File

@ -47,6 +47,7 @@ A2osX terminal capabilities are based off of the standard VT100 Terminal. This
|Esc[5m |Turn blinking mode on| SGR5
|Esc[7m |Turn reverse video on| SGR7 |OK|
|Esc[8m |Turn invisible text mode on| SGR8 ||
|Esc[FG;BGm| Set Text Color to FG and BG |OK|
|Esc[Line;Liner |Set top and bottom lines of a window| DECSTBM |OK|
|Esc[ValueA |Move cursor up n lines| CUU ||
|Esc[ValueB |Move cursor down n lines| CUD ||

View File

@ -279,6 +279,12 @@ There are several ways you can configure A2osX to suit your needs. Some of thes
### Networking
In A2osX, using a command like *telnet* involves loading a driver for your hardware, loading a library for network functions, performing networking initialization (get IP address) and running your network centric application (in this case telnet). One of the clear advantages to A2osX is its reusable or reentrant nature which allows multiple applications to use the network library at the same time.
>A note on memory management: While the architecture of A2osX saves considerably on memory usage through shared libaries, the network stack still consumes approximately 10K. There may be times when you no longer need the network but do need more free memory to execute an application or script. In these cases, it is possible to unload portions of the network stack (specifically the library) but not others (the driver). If you have no network applications running (this is important!) like *telnetd*, *httpd*, *ping*, *telnet*, etc. and you use *kill* on the **PID** of the *networkd* process this will unload the network library returning about 8K to the memory pool.
>A more technical note: When you start networking, you load a driver and then you execute *networkd* passing it the names of the network libraries you want loaded (typically *libtcpip*). After loading the library, *networkd* reads *etc/tcpip.conf* to configure TCP/IP and if not present requests settings via DHCP. If for some reason the DHCP lease did not work you can use the command *ipconfig* to repeat the network config stage. As stated above you can unload networking, this note explains what actually occurs under the covers (the internals). When *networkd* starts and loads *libtcpip* a lock is placed on *libtcpip* to indicate a process is using it (in this case *networkd*). Then when you load other network programs such as *telnetd*, the telnet server daemon, another lock is placed on *libtcpip*. If you then run *ping* or *telnet* another lock is added, but then when they finish and exit, that lock is removed. When all locks have been removed the library automatically unloads (this is how you recover the memory the library uses). It is VERY important that you stop all the applications using *libtcpip* before stopping *networkd*. This is because if you stop *networkd* first, then *telnetd* will be left in an unknown state (it is waiting on pulses from *networkd* which you just stopped) **and** it is holding a lock *libtcpip* so it never gets unloaded.
install the drivers for the hardware (uther, lances, ssc, etc.)
then NETWORKD lib lib (and the libs are tcpip or etalk maybe) libs are protocalls here
in the LIB directory now are LIBTCPIP and LIBETALK
@ -309,6 +315,7 @@ dhcpclnt
Telnetd
httpd
### Utilities
#### Using Text Editors

Binary file not shown.