home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
MBUG
/
MBUG005.ARC
/
DTOMBUG
< prev
next >
Wrap
Text File
|
1979-12-31
|
5KB
|
133 lines
Dave Nowlan,
7 Albert Street,
Hawthorn East,
Vic 3123
Dear Ed,
Oε thi≤ disπ therσ arσ │ MICROWORL─ BASI├ program≤ whicΦ ma∙ hel≡ ì
junio≥ schoolkid≤ witΦ al∞ tha⌠ borinτ arithmetic«á Iε al∞ three¼ ì
I have tried to give help if the wrong answer is given.
*ááááTABLE╙á doe≤á simplσá additions¼á subtractions¼á multiplies¼ ì
ááááádivide≤á anΣ remainders«á I⌠ i≤ writteε fo≥ ß colou≥ BE┼á s∩ ì
áááááyo⌡á ma∙ neeΣ t∩ takσ ou⌠ al∞ thσ COLO╥á statements«á Ou≥á ╡ ì
áááááyea≥ olΣ useΣ t∩ enjo∙ playinτ witΦ it
*ááááLMUL╘á lead≤á yo⌡á througΦá ßá simplσ ▓á digi⌠á b∙á ▓á digi⌠ ì
ááááámultiplication« I⌠ use≤ thσ formulß
áááááááááá10a+Γ ¬ 10c+Σ ╜ 100aπ ½ 10aΣ ½ 10bπ ½ bd
ááááá╔á thinδá tha⌠ thi≤ i≤ ß simplσ methoΣ a≤ i⌠á separate≤á thσ ì
ááááámultiplicatioεááá anΣáá additioεáá steps«ááá Thσááá approacΦ ì
ááááá(Trautenberg?⌐ get≤ unwield∙ witΦ bigge≥ number≤ bu⌠ tha⌠ i≤ ì
áááááwha⌠ computer≤ arσ for.
*ááááLDI╓ lead≤ yo⌡ througΦ ß lonτ divisioε ste≡ b∙ ste≡ ie
ááááááááááseσá iµ i⌠ goes¼á iµ no⌠ brinτ dowε thσ nex⌠ figurσ anΣ ì
áááááááááátr∙ again
áááááááááámultipl∙ thi≤ quotien⌠ b∙ thσ divisor
áááááááááásubtrac⌠ produc⌠ froφ dividend
loo≡ unti∞ complete
Do with them as you will.
N∩ prize≤ fo≥ quessinτ wherσ fallout.π camσ from« I'vσ changeΣ i⌠ ì
t∩á bσá iε colou≥ anΣ t∩ acces≤ screeε RA═ direc⌠ s∩ tha⌠á i⌠á i≤ ì
much faster. Or you can have more things moving around.
.paèTherσ arσ als∩ somσ ├ program≤ whicΦ arσ m∙ attemp⌠ t∩ builΣá anΣ ì
demonstratσá window≤á includinτ gloriou≤á technicolour«á ╔á woulΣ ì
appreciatσá constructivσá criticisφ anΣ als∩ somσ advicσá oεá thσ ì
bugs.
I⌠á al∞á starteΣá a≤ aε attemp⌠ t∩ cop∙ somσ oµ thσá feature≤á oµ ì
IBM'≤ BASIC┴ iσ thσ abilit∙ t∩ operatσ oε (eτ clear⌐ onl∙ par⌠ oµ ì
thσá screen«á Therσ i≤ als∩ thσ probleφ oµ handlinτ colou≥ (aφá ╔ ì
thσ onl∙ onσ witΦ ß colou≥ disπ system?).
*ááááwdefines.Φ i≤ ß filσ whicΦ define≤ thσ Windo≈ structurσá anΣ ì
áááááals∩á thσá variou≤ commands«á A≤ fa≥ a≤ possiblσá thesσá arσ ì
ááááásimilia≥á t∩á thσ norma∞ 654╡ commands«á Thi≤ filσá mus⌠á bσ ì
áááááincludeΣ iε al∞ ├ file≤ whicΦ usσ thσ windo≈ routines.
*ááááwindows.πá hold≤ thσ variou≤ windo≈ routines«á A≤ i⌠ i≤ herσ ì
ááááái⌠á mus⌠á bσá includeΣ iε onσ (anΣ onl∙ one⌐á oµá thσá file≤ ì
ááááámakinτ u≡ thσ program.
ááááááááááWcurso≥ i≤ supposeΣ t∩ positioε thσ CP/═ curso≥ a⌠á thσ ì
áááááááááápositioεá correspondinτ t∩ thσ CursX,┘ positioε iεá thσ ì
áááááááááácurren⌠ window.
ááááááááá Wdispla∙ i≤ reall∙ ß debugginτ aid
ááááááááá WfolΣ bring≤ thσ CursX,┘ positioε bacδ int∩ thσ windo≈ ì
ááááááááááeτ wra≡ t∩ thσ nex⌠ line
áááááááááWgetcha≥á get≤ ß characte≥ froφ thσ keyboard«á Notσá i⌠ ì
ááááááááááignore≤ nulls.
ááááááááááWget≤ return≤ thσ addres≤ oµ ß strinτ froφ thσ keyboarΣ ì
ááááááááááb∙ iterativσ call≤ oε Wgetchar«á Thσ norma∞ GET╙ canno⌠ ì
áááááááááábσá useΣ a≤ i⌠ doe≤ no⌠ handlσ colour≤ anΣ wil∞á ignorσ ì
ááááááááááthσ windo≈ boundaries.
ááááááááááWinitia∞ mus⌠ bσ thσ firs⌠ routinσ calleΣ a≤ i⌠ set≤ u≡ ì
ááááááááááthσ Screeε structurσ anΣ thσ backgrounΣ colours
ááááááááááWpokσ put≤ thσ characte≥ iε thσ righ⌠ placσ (anΣ iε thσ ì
áááááááááárigh⌠ colour⌐ oε thσ screen«
ááááááááááWputcha≥ put≤ ß characte≥ usinτ Wpokσ afte≥ sortinτ ou⌠ ì
ááááááááááall the control characters as in wdefines
ááááááááááWputs puts a string using iterative calls on Wputcharááááááááááááááá
ááááááááááWsizσá change≤ thσ Screeε size╗á i⌠ shoulΣ probabl∙á bσ ì
áááááááááábuilt into Winitial
*áááádisc.πá i≤á ßá prograφ whicΦ use≤ window≤ t∩ sho≈á ho≈á ful∞ ì
áááááand tidy the disc is. Give it a burl.
*áááátest.πá wa≤ useΣ t∩ tr∙ ou⌠ thσ variou≤ contro∞á characters« ì
áááááIt is ponderous to use.èAny good? The known bugs are
*ááááWcursor is suspect
*ááááThσ firs⌠ cal∞ oε Wgetcha≥ (eithe≥ direc⌠ o≥ viß Wgets⌐ doe≤ ì
ááááánot display the cursor ie the inverse space.
Thσá maiε probleφ i≤ ho≈ t∩ se⌠ u≡ thσ routine≤ fo≥ usσá a≤á somσ ì
wa∙á mus⌠á bσ founΣ t∩ savσ thσ datß iε thσ Screeε structurσá fo≥ ì
use by Wpoke (and Wsize if this is kept separate).
╔á trieΣ compilinτ windows.π (#includσ bdscio.Φá anΣá wdefines.h⌐ ì
anΣ theε usinτ thσ CR╠ filσ a≤ ß library« Naturall∙ thi≤ doe≤ no⌠ ì
work¼á Screeε doe≤ no⌠ exis⌠ anΣ thσ resultinτ prograφ assume≤ i⌠ ì
i≤á a⌠ locatioε 0000«á (I⌠ work≤ unti∞ yo⌡ acces≤ ßá routinσá (eτ ì
reaΣ ß disc⌐ whicΦ use≤ thi≤ location.)
╔ trieΣ linkinτ thσ CR╠ filσ a≤ ß sub-program«á Howeve≥ Screeε i≤ ì
generateΣá a⌠ thσ star⌠ oµ thσ modulσ anΣ thσ correspondinτá areß ì
mus⌠ bσ maskeΣ iε thσ maiε prograφ iµ thi≤ i≤ linkeΣ first«á Wil∞ ì
it work if windows is linked as the first module?????
Includinτá windows.πá iε onσ oµ thσ prograφ file≤ doe≤á worδá bu⌠ ì
doe≤á meaε tha⌠ al∞ thσ routine≤ arσ calleΣ iε eveε iµ no⌠á used« ì
Notσá tha⌠á thi≤ includσ mus⌠ bσ outsidσ an∙ functioεá a≤á Screeε ì
must be (at least partially) global.
Eventuall∙áá wdefines.Φá shoulΣá bσá includeΣá iεá thσáá standarΣ ì
definitions.ì
Have fun,