home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
math
/
n41.lbr
/
N40.DQC
/
N40.DOC
Wrap
Text File
|
1986-10-30
|
4KB
|
126 lines
N Ver 4.0 Numerical/Logical Converter/Evaluator (C)1985 Norman H. Strassner
D O C U M E N T A T I O N N O T E S
N40 operates as either a CP/M transient or in a local command mode.
N40 enables translation and logical evaluation of numbers and expressions,
sending all results to the console device and optionally to a disk file.
Transient operation:
See examples below
Local command mode:
All examples below are valid PLUS:
ESCape key - Enables/Disables output file. Fully prompting.
"?" - Displays help page
";" - Allows entering a comment into output file.
Any expressions past semicolon are ignored.
Accepts DECIMAL, HEX and BINARY numbers, and ASCII characters,
Displaying equivalences in all four forms. APPEND n with "H" if hex, "B"
if binary. No appendage if decimal
PREFIX control characters (^@ - ^Z) with caret "^"
PREFIX CAPITAL ASCII (SPACE - TILDE"~") with "@"
PREFIX LOWER CASE ASCII (a - z) with "!"
LOGICAL OPERATORS: + ADD - SUB * MUL / DIV AND OR XOR . (.=CLEAR)
Delimeters between commands = space or comma
From Command Line:
A>N n ....For single input
A>N n n,n,n,n n...n ....For multiple inputs
A>N n [logical op] n [logical op],n n . n [logical op] n
Entire line can be mixed with single inputs and logical equations.
A period [.] in the command line will clear the 16 bit accumulator and
restart the program, resuming next position in command line after [.].
N40 will not give remainders from division, or overflow indicators of
results greater than 65535 (0FFFFH)
Example:
A series of expressions and numbers from the command prompt:
Example 1:
Transient conversions, one or more operations:
A>N40 5 9 4 . ^A !A @A
---- DECIMAL ---- HEXIDECIMAL -------- BINARY ----- -- ASCII --
5 0005H 00000000 00000101B ^E
9 0009H 00000000 00001001B ^I
4 0004H 00000000 00000100B ^D
---- DECIMAL ---- HEXIDECIMAL -------- BINARY ----- -- ASCII --
23 0017H 00000000 00010111B ^W
AND 42 002AH 00000000 00101010B *
= 2 0002H 00000000 00000010B ^B
---- DECIMAL ---- HEXIDECIMAL -------- BINARY ----- -- ASCII --
1 0001H 00000000 00000001B ^A
97 0061H 00000000 01100001B a
65 0041H 00000000 01000001B A
A>
Example 2:
Transient numerical/logic conversion conversion, one or more operations:
A>N40 500 + 460 / 2 . 110110B OR 000001B . FAFH AND FA0H OR 4 . 9038
---- DECIMAL ---- HEXIDECIMAL -------- BINARY ----- -- ASCII --
500 01F4H 00000001 11110100B [N/A]
ADD 460 01CCH 00000001 11001100B [N/A]
= 960 03C0H 00000011 11000000B [N/A]
DIV 2 0002H 00000000 00000010B ^B
= 480 01E0H 00000001 11100000B [N/A]
---- DECIMAL ---- HEXIDECIMAL -------- BINARY ----- -- ASCII --
54 0036H 00000000 00110110B 6
OR 1 0001H 00000000 00000001B ^A
= 55 0037H 00000000 00110111B 7
---- DECIMAL ---- HEXIDECIMAL -------- BINARY ----- -- ASCII --
4015 0FAFH 00001111 10101111B [N/A]
AND 4000 0FA0H 00001111 10100000B [N/A]
= 4000 0FA0H 00001111 10100000B [N/A]
OR 4 0004H 00000000 00000100B ^D
= 4004 0FA4H 00001111 10100100B [N/A]
---- DECIMAL ---- HEXIDECIMAL -------- BINARY ----- -- ASCII --
9038 234EH 00100011 01001110B [N/A]
A>
Example 3:
From internal command line:
N40>4D90H OR 0FFH + 1 . 16 * 9 / 2 . 10011B OR 111000B
---- DECIMAL ---- HEXIDECIMAL -------- BINARY ----- -- ASCII --
19856 4D90H 01001101 10010000B [N/A]
OR 255 00FFH 00000000 11111111B
= 19967 4DFFH 01001101 11111111B [N/A]
+ 1 0001H 00000000 00000001B ^A
= 19968 4E00H 01001110 00000000B [N/A]
---- DECIMAL ---- HEXIDECIMAL -------- BINARY ----- -- ASCII --
16 0010H 00000000 00010000B ^P
* 9 0009H 00000000 00001001B ^I
= 144 0090H 00000000 10010000B ^P
/ 2 0002H 00000000 00000010B ^B
= 72 0048H 00000000 01001000B H
---- DECIMAL ---- HEXIDECIMAL -------- BINARY ----- -- ASCII --
19 0013H 00000000 00010011B ^S
OR 56 0038H 00000000 00111000B 8
= 59 003BH 00000000 00111011B ;
Questions and comments to:
-Norman H. Strassner
CIS PPN 72135,1051
MCI NSTRASS
SYSOP, VIDEOMAN RCP/M
HOLLYWOOD, CA.
(213) 666-8588 300/1200bd