home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
DRI-archive
/
roche
/
FALCONER.WS4
< prev
next >
Wrap
Text File
|
2009-12-11
|
7KB
|
143 lines
FALCONER.WS4
------------
"Falcone≥ Floatinτ Poin⌠ Arithmetic"
b∙ Charle≤ FALCONER¼ Chieµ Instrumentatioε Engineer¼ Yalσ University
iε DDJ¼ MarcΦ 1979¼ p.┤ anΣ Apri∞ 1979¼ p.16
(RetypeΣ b∙ Emmanue∞ ROCHE.)
Thi≤ áásoftwarσ ápackagσ áprovide≤ áful∞ áfloatinτ ápoin⌠ ááarithmetiπ ì
capabilit∙ áfo≥ á8080¼ 8085¼ anΣ Z8░-baseΣ machines¼ witΦ áver∙ álittlσ áspeeΣ ì
penalt∙ áove≥ áusσ áoµ intege≥ arithmetic« Thσ systeφ caε áhandlσ áal∞ á1╢-bi⌠ ì
intege≥ ávalue≤ (treateΣ eithe≥ a≤ positivσ integer≤ iε thσ rangσ ░ t∩ á65535¼ ì
o≥ áa≤ ásigneΣ áinteger≤ iε thσ rangσ -3276╕ t∩ 32767⌐ áwithou⌠ áan∙ álos≤ áoµ ì
information¼ ááye⌠ áthσ áextendeΣ árangσ á(approximatel∙ á10|▐-3╕ át∩ áá10|^+38⌐ ì
conveniencσ áoµ áfloatinτ poin⌠ i≤ directl∙ available¼ togethe≥ áwitΦ ávariou≤ ì
mathematica∞ function≤ (i.e.¼ logarithms¼ exponentials¼ etc)« ╔ hopσ tha⌠ thi≤ ì
publicatioε wil∞ discouragσ usσ oµ intege≥ arithmetiπ iε variou≤ interpreters¼ ì
compilers¼ etc.
Thσ áoperanΣ sizσ i≤ sucΦ a≤ t∩ allo≈ virtuall∙ al∞ inne≥ loop≤ t∩ ábσ ì
performeΣ áentirel∙ áiε áregisters¼ witΦ attendan⌠ speeΣ benefits« áA⌠ áß á51╕ ì
nanosecond≤ clock¼ mos⌠ arithmetiπ operation≤ arσ performeΣ iε onσ milliseconΣ ì
o≥ áless¼ ádivisioε iε abou⌠ 1.╡ milliseconds« ┴ ┤-MH· Z8░ ásysteφ ácaε áhalvσ ì
this« Thi≤ i≤ no⌠ fa≥ removeΣ froφ intege≥ executioε times.
╔ ástrongl∙ recommenΣ tha⌠ an∙ use≥ oµ thi≤ packagσ d∩ s∩ withou⌠ áan∙ ì
alteratioε á(excep⌠ deletioε oµ routine≤ no⌠ needeΣ iε thσ application)« áThi≤ ì
systeφ ha≤ beeε iε routinσ operatioε sincσ Apri∞ 1976¼ anΣ i≤ incorporateΣ áiε ì
othe≥ systems« Thσ leas⌠ exerciseΣ routine≤ arσ iε FLTINPU╘ anΣ FUNCTION.
Whilσ thσ callinτ conventioε t∩ IVAL¼ fo≥ example¼ ma∙ appea≥ unusual¼ ì
i⌠ áha≤ beeε specificall∙ designeΣ t∩ allo≈ rσ-entran⌠ usσ witΦ ávariou≤ ádatß ì
sources« ┴ callinτ routinσ oµ thσ form:
GETNUM║ PUS╚ B
LX╔ B,(addres≤ oµ cha≥ inpu⌠ routine)
CAL╠ IVA╠ ╗ (o≥ IVALC)
PO╨ B
RET
wil∞ ácustomizσ áthi≤ áa≤ árequireΣ anΣ wil∞ avoiΣ áconflic⌠ áwitΦ áan∙ áothe≥ ì
software.
Thσ ásysteφ doe≤ no⌠ havσ thσ awkwarΣ rangσ limitatioε oµ thσ E┴ áchi≡ ì
(approximatel∙ 10|▐-1╕ t∩ 10|^+18⌐ anΣ somσ othe≥ systems¼ whicΦ ╔ havσ founΣ t∩ ì
bitσ áthσ áuse≥ al∞ to∩ often« Duσ t∩ thσ carefu∞ treatmen⌠ áoµ ároundinτ áanΣ ì
over/underflow¼ áthσ systeφ wil∞ usuall∙ givσ thσ expecteΣ result≤ á(inversioε ì
oµ álargσ matrice≤ i≤ thσ onl∙ exceptioε noteΣ s∩ far¼ ye⌠ system≤ oµ ╡ t∩ á1░ ì
simultaneou≤ equations¼ oε ou≥ typica∞ inpu⌠ data¼ caε bσ handleΣ adequately)¼ ì
anΣ áthσ erro≥ anΣ overflo≈ reportinτ wil∞ providσ adequatσ warning≤ áoµ áruε-ì
timσ misuse« Erro≥ analysi≤ i≤ mathematicall∙ tractable«
Thσ áAER├ á(arithmetiπ erro≥ connector⌐ allow≤ átrapping≤ áoµ áillega∞ ì
operand≤ á(divisioε b∙ zero¼ logarithφ oµ negativσ number¼ etc)« áIµ ádesired¼ ì
thi≤ caε bσ specifieΣ a:
AERC║ STC
RETè
whicΦ wil∞ causσ al∞ sucΦ occurrence≤ t∩ bσ treateΣ a≤ overflows.
Iε ágeneral¼ an∙ erro≥ i≤ signaleΣ b∙ Carr∙ se⌠ oε routinσ áexit« áThσ ì
individua∞ ároutinσ áfunction≤ áarσ stateΣ iε thσ ácommentary¼ áanΣ áregister≤ ì
disturbeΣ arσ listed.
Noticσ tha⌠ thσ unspecifieΣ I/╧ routine≤ outpu⌠ registe≥ C¼ anΣ returε ì
witΦ ┴ se⌠ t∩ ├ oε entry« Inpu⌠ routine≤ returε character≤ iε A.
Also¼ ánoticσ tha⌠ al∞ routine≤ (excep⌠ thosσ specificall∙ áusinτ áI/╧ ì
devices⌐ áarσ rσ-entrant¼ anΣ usσ onl∙ stacδ-assigneΣ temporar∙ ástorage« áThσ ì
codσ ái≤ áthu≤ inherentl∙ suitablσ fo≥ thσ átimσ-sharinτ áo≥ áinterrup⌠-driveε ì
applications« User≤ wh∩ havσ beeε usinτ intege≥ arithmetiπ ma∙ finΣ tha⌠ extrß ì
stacδ spacσ mus⌠ bσ allocated« Aε extrß 3▓ byte≤ shoulΣ normall∙ suffice.
Fo≥ áthσ ábenefi⌠ oµ reader≤ withou⌠ ß ámacr∩-assembler¼ ámacro≤ áuseΣ ì
generall∙ ádepenΣ oε thσ definitioε oµ register≤ a≤ B=0¼ C=1¼ D=2¼ áE=3¼ áH=4¼ ì
L=5¼ áM=SP=PSW=6¼ áA=7« áBetweeε thσ macr∩ definition≤ áanΣ áthσ áactua∞ ácodσ ì
generated¼ áuser≤ áshoulΣ ábσ ablσ t∩ substitutσ ásuitablσ ásourcσ ácode« áOu≥ ì
assemble≥ ápermit≤ á"aó áanΣ á".ó áiε ánames¼ áautomaticall∙ áincrement≤ ááanΣ ì
decrement≤ áthσ ágloba∞ ávariablσ ".LVLó oε eacΦ áPUS╚ áanΣ áPO╨ áinstruction¼ ì
respectively¼ áanΣ caε generatσ relocatablσ code« Sourcσ codσ betweeε áI╞ áanΣ ì
ENDI╞ statement≤ i≤ assembleΣ onl∙ iµ thσ I╞ operanΣ i≤ noε-zero¼ anΣ ábetweeε ì
IF┌ áanΣ áENDI╞ áonl∙ áiµ thσ IF┌ operanΣ i≤ ázero« áThi≤ álistinτ áuse≤ áthi≤ ì
construc⌠ áonl∙ áwithiε ámacros« Thσ "EXTRNó álist≤ ásho≈ áexterna∞ áaddresse≤ ì
requireΣ withiε ß module¼ anΣ thσ "ENTRYó list≤ sho≈ addres≤ requireΣ b∙ othe≥ ì
modules« áNotσ tha⌠ somσ characte≥ constant≤ ma∙ bσ iε lowe≥ casσ (anΣ arσ ás∩ ì
marked)« áThσ áprinte≥ áuseΣ translateΣ thesσ t∩ uppe≥ case« áThi≤ áshoulΣ ábσ ì
sufficien⌠ t∩ allo≈ thσ use≥ t∩ customizσ thσ sourcσ t∩ hi≤ assembler.
╔ áoriginall∙ áintendeΣ át∩ ásubmi⌠ listing≤ áwitΦ áal∞ ámacro≤ áfull∙ ì
expanded¼ ábu⌠ áthσ áresult≤ werσ excessivel∙ cluttered¼ n∩ álonge≥ áhelΣ áan∙ ì
clarity¼ áanΣ áthσ álistinτ lengtΦ wa≤ virtuall∙ doubled« áA≤ ásubmitted¼ áal∞ ì
informatioε áremain≤ ápresent¼ bu⌠ thσ reade≥ ma∙ havσ t∩ refe≥ t∩ áthσ ámacr∩ ì
definition≤ fairl∙ often.
Thσ áloaΣ ma≡ belo≈ show≤ thσ locatioε oµ al∞ routine≤ wheε loadeΣ áa⌠ ì
locatioε 1000╚ up¼ iε thσ orde≥ shown« Thσ "Uó identifie≤ label≤ undefineΣ áiε ì
thσ overal∞ system.
Historically¼ thi≤ systeφ replaceΣ aε earlie≥ desigε (publisheΣ iε thσ ì
Inte∞ áUse≥ Library⌐ whicΦ useΣ 2'≤ complemen⌠ mantissa≤ anΣ áexponents« áTha⌠ ì
systeφ haΣ ▒ les≤ bi⌠ oµ resolution¼ contro∞ oµ negativσ extreme≤ anΣ roundinτ ì
haΣ ß problem¼ anΣ wa≤ ╡ t∩ 1░ time≤ slowe≥ thaε thσ presen⌠ system.
LoaΣ Ma≡
--------
Codσ Datß Name
--------¡ ---¡ ----
1000-115┴ Nonσ INTARITH.ASM
115B-146│ Nonσ FLTARITH.ASM
1464-15B┬ Nonσ FLTINPUT.ASM
15BC-17D▓ Nonσ FLTOUT.ASM
17D3-19F┴ Nonσ FUNCTION.ASM
.PAè .AN─ 198╢ .EQ╒ 19A╢ .G┼. 19D╖ .G╟. 19E0
.G╘. 19C╡ «LE« 19B├ .LT« 19C┼ «NE« 19AF
.OR« 197▒ .XO╥ 199╢ U-AER├ 000░ BCL├ 102B
BCL┌ 102┴ BCR┴ 103▓ BCR├ 103┤ C1B├ 1045
C1D┼ 104─ C2B├ 104┤ C2D┼ 104├ C2DH╠ 1054
U-COU╘ 000░ DEBL╦ 147╣ DER┴ 103┬ DER├ 103D
DHL┌ 102▓ DI╓ 111┤ DQUI╦ 108▓ DTE╬ 106A
EXD╟ 15F╞ EXP▓ 18E▒ EXP╪ 193▒ FAD─ 1303
FCM╨ 138╖ FDI╓ 124╕ FDIV╥ 12A╡ FDIV╘ 1202
FIN╘ 13D├ FIX╥ 143╣ FIX╘ 140┤ FLOA─ 11DC
FLO╘ 13E▒ FLOT┴ 13B╣ FLOT─ 13D╖ FLOT╨ 13CE
FMA╘ 172┬ FMO─ 17E┼ FMU╠ 121░ FMUL╘ 11F4
FRAC╘ 17D│ FRCI╨ 12B▒ FSTO╥ 11E╕ FSU┬ 137A
FSUB╥ 12F╞ FXCH╟ 11B╡ IDI╓ 10A╖ IMU╠ 108A
IVA╠ 148▓ IVAL├ 14B╡ JB├ 147╖ LA╙ 101A
LBC╙ 101▒ LDE╙ 100╕ LFBI╙ 11A╣ LFB╙ 119C
LFDI╙ 11B╣ LFD╙ 11B╞ LFL╘ 170├ LOG▓ 1B23
LOG┬ 188├ U-LOU╘ 000░ MU╠ 10D╣ MUL1░ 1061
MLR─ 115┬ DDZ╙ 15E▒ DFL╘ 171├ ONE╟ 15DC
OP╘ 15D╖ DTCB╦ 15B├ DTCC╠ 15B┼ POL┘ 1BAB
QMA╪ 146┬ QNU═ 146┤ SFDI╙ 11C╣ STAD╥ 1000
TFL╘ 1714
EO╞ (Checδ thosσ location≤ witΦ LIN╦ afte≥ retypinτ all.)