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
/
CPM
/
GENASM
/
DISPMEN.LBR
/
DISPMEN.DQC
/
DISPMEN.DOC
Wrap
Text File
|
2000-06-30
|
7KB
|
150 lines
áááááDocumentatioε fo≥ DISPMEN.MA├ -b∙ R« Buckmaε [72356,344]
ááááá DISPME╬ i≤ ß macr∩ tha⌠ take≤ ß men⌡ anΣ split≤ i⌠ int∩ tw∩ ì
ááááácolumns« I⌠ i≤ knowε t∩ worδ witΦ M80¼ anΣ wil∞ probabl∙ worδ witΦ ì
áááááMA├ afte≥ somσ mino≥ changes« Onσ oµ thosσ change≤ wil∞ bσ movinτ thσ ì
ááááá"MENFL╟ SE╘ FALSEó statemen⌠ (oε thσ firs⌠ line⌐ t∩ somewherσ nea≥ thσ ì
ááááábeginninτ oµ you≥ maiε sourcσ file« MA├ doe≤ no⌠ accep⌠ thσ ì
ááááádefinitioε oµ SE╘ statement≤ withiε ß macr∩ library.
áááááReason for Writing
ááááá Afte≥ foolinτ arounΣ witΦ thσ APMOD77╖ sourcσ filσ (Applσ versioε ì
áááááoµ MODEM7⌐ anΣ addinτ somσ morσ men⌡ options¼ ╔ noticeΣ tha⌠ thσ men⌡ ì
áááááwa≤ gettinτ ß bi⌠ full╗ almos⌠ scrollinτ ofµ oµ thσ screen! Thσ CA╠ ì
áááááoptioε spli⌠ thσ phonσ number≤ int∩ tw∩ columns¼ s∩ wh∙ no⌠ thσ maiε ì
ááááámenu┐ Afte≥ lookinτ a⌠ ho≈ thσ phonσ numbe≥ men⌡ wa≤ split¼ ╔ decideΣ ì
ááááátha⌠ i⌠ woulΣ bσ to∩ mucΦ troublσ t∩ adap⌠ thosσ routine≤ t∩ thσ maiε ì
ááááámenu« Thσ answe≥ wa≤ t∩ writσ ß macr∩ tha⌠ coulΣ takσ an∙ men⌡ (witΦ ì
áááááfixeΣ lengtΦ options⌐ anΣ split it.
áááááFeatures
ááááá ∩ Men⌡ entrie≤ caε bσ addeΣ o≥ deleteΣ iε thσ sourcσ filσ ì
ááááá without changing any programming code or addresses.
ááááá ∩ Thσ macr∩ (betweeε thσ conditiona∞ I╞ statements⌐ i≤ assembleΣ ì
ááááá onl∙ oncσ witΦ subsequen⌠ call≤ t∩ thσ macr∩ vectoreΣ througΦ ì
ááááá call≤ t∩ ?SETUP« Thσ morσ menu≤ you≥ prograφ has¼ thσ morσ ì
áááááááááááááspacσ thi≤ saves« (Well¼ sor⌠ of« Tha⌠ i≤ thσ equivilen⌠ oµ ì
ááááááááááááábuying more of a sale item to save more!)
ááááá o A≤ distributed¼ i⌠ wil∞ begiε printinτ thσ righ⌠ columε iε thσ ì
ááááááááááááá41s⌠ characte≥ position« Thi≤ i≤ easil∙ changeΣ t∩ sui⌠ thσ ì
áááááááááááááuser by changing one byte in the COMOF1: routine.
o Mos⌠ menu≤ arσ iε somσ typσ oµ logica∞ orde≥ (ie║ ì
áááááááááááááalphabetical)« Thi≤ macr∩ preserve≤ tha⌠ orde≥ iε tha⌠ i⌠ ì
áááááááááááááwil∞ takσ thσ seconΣ men⌡ option anΣ prin⌠ i⌠ directl∙ beneatΦ ì
áááááááááááááthe first menu option and not next to it. You get this:
áááááááááááááA - (1st menu option) D - (4th menu option)
áááááááááááááB - (2nd menu option) E - (5th menu option)
áááááááááááááC - (3rd menu option)
áááááááááááááand not this:
áááááááááááááA - (1st menu option) B - (2nd menu option)
áááááááááááááC - (3rd menu option) D - (4th menu option)
áááááááááááááE - (5th menu option)
oááMenu≤ witΦ aε odΣ numbe≥ oµ option≤ wil∞ prin⌠ onσ morσ optioε ì
áááááááááááááin the left column than in the right column.
èLimitations
o EacΦ optioε withiε ß men⌡ mus⌠ contaiε thσ samσ numbe≥ oµ ì
ááááááááááááácharacter≤ (fixeΣ length⌐ a≤ al∞ thσ othe≥ option≤ withiε tha⌠ ì
ááááááááááááámenu« Spaces (tabs are not allowed ) can be used as filler.
o Thσ tota∞ numbe≥ oµ character≤ iε tw∩ men⌡ option≤ plu≤ tw∩ ì
áááááááááááááspace≤ (t∩ seperatσ thσ columns⌐ caε no⌠ bσ greate≥ thaε you≥ ì
áááááááááááááscreeε width« Fo≥ example; iµ eacΦ men⌡ optioε i≤ 3░ ì
ááááááááááááácharacter≤ lonτ theε tw∩ option≤ arσ 6░ character≤ lonτ plu≤ ▓ ì
áááááááááááááspace≤ equal≤ 6▓ characters¼ s∩ you≥ screeε mus⌠ bσ a⌠ leas⌠ ì
ááááááááááááá6│ character≤ widσ (allowinτ onσ fo≥ auto-linefeeds)« Thσ ì
ááááááááááááámaximuφ numbe≥ oµ character≤ tha⌠ ß men⌡ optioε caε havσ fo≥ ì
áááááááááááááaε 8░ columε displa∙ i≤ 38« Thσ minimuφ numbe≥ oµ character≤ ì
ááááááááááááái≤ one.
oááThσ tota∞ numbe≥ oµ men⌡ option≤ tha⌠ wil∞ fi⌠ onσ 2┤ linσ ì
áááááááááááááscreen¼ i≤ 46« Forty-eigh⌠ option≤ wil∞ scrol∞ thσ to≡ tw∩ ì
áááááááááááááoff of the screen.
Implementation
T∩ incorporatσ DISPMEN.LIB int∩ you≥ program¼ d∩ thσ followinτ t∩ you≥ ì
sourcσ code:
a. Where you want the menu to be displayed, insert the line:
DISPMEN MENUxTOP,MENUxBOT,y
wherσ "xó i≤ ß digi⌠ froφ ░ t∩ ╣ (i⌠ caε bσ a≤ man∙ digit≤ a≤ yo⌡ ì
ááááááááááwant¼ withiε thσ restriction≤ oµ you≥ assembler⌐ anΣ "yó i≤ thσ ì
áááááááááánumbe≥ oµ character≤ iε eacΦ men⌡ option« (Othe≥ menu≤ caε havσ ì
ááááááááááa different length.)
b. A⌠ thσ top/beginninτ oµ you≥ menu¼ jus⌠ beforσ thσ firs⌠ men⌡ ì
ááááááááááoption, inser⌠ thσ line:
MENUxTOP EQU $
ááááááááááand just after the last menu option, insert the line:
ááááááááááMENUxBOT EQU $
Thσ numbe≥ useΣ fo≥ "xó mus⌠ bσ thσ samσ a≤ tha⌠ useΣ iε ste≡ a« ì
anΣ eacΦ men⌡ mus⌠ havσ ß differen⌠ number« Iε thi≤ way¼ menu≤ ì
áááááááááámay bσ placeΣ anywherσ iε thσ sourcσ code.
.PAè c. Nea≥ thσ beginninτ oµ you≥ sourcσ code¼ inser⌠ ß referencσ t∩ thσ ì
áááááááááámacr∩ or¼ iµ yo⌡ wish¼ adΣ DISPME╬ t∩ you≥ macr∩ library« I'vσ ì
ááááááááááinserteΣ i⌠ iε m∙ MODEM╖ macr∩ librar∙ anΣ thσ referencσ look≤ ì
áááááááááálike this:
ááááááááááMACLIB MODEM7.LIB
ááááááááááOtherwise, just leave it as DISPMEN.LIB.
Demonstration
┴ demonstratioε oµ DISPME╬ i≤ provideΣ withiε thi≤ librar∙ (.LBR⌐ ì
áááááfile« Thσ demonstratioε filσ namσ i≤ DISPDEMO.MAC« Bσ surσ t∩ stud∙ ì
ááááái⌠ iε orde≥ t∩ gaiε aε understandinτ oµ ho≈ thσ men⌡ shoulΣ looδ iε ì
áááááyou≥ sourcσ file« Remember¼ tab≤ arσ no⌠ alloweΣ withiε thσ singlσ ì
áááááquotation marks and each option must be preceded by a "DB".
ááááá T∩ usσ thσ demo¼ placσ you≥ disδ witΦ M80.CO═ anΣ L80.CO═ iε ì
ááááádrivσ A║ anΣ you≥ disδ witΦ DISPDEMO.MA├ anΣ DISPMEN.LI┬ iε drivσ B:« ì
áááááType:
áááááA:M80 =DISPDEMO<ret>
áááááThis will create an REL file. Next type:
ááááA:L80 DISPDEMO,DISPDEMO/N/E<ret>
áááááThis will create an executable COM file (DISPDEMO.COM). Type:
áááááDISPDEMO<ret>
áááááanΣ yo⌡ wil∞ seσ thσ lis⌠ oµ option≤ fo≥ men⌡ one« Pres≤ an∙ ke∙ anΣ ì
áááááyou will see the list of options for menu two.
Epilogue
╔ aφ no⌠ al∞ tha⌠ familia≥ witΦ Digita∞ Research'≤ "MACó macr∩ ì
áááááassembler¼ anΣ thereforσ havσ no⌠ provideΣ mucΦ informatioε oε ho≈ t∩ ì
áááááusσ i⌠ here« I⌠ seem≤ tha⌠ morσ peoplσ havσ MAC¼ bu⌠ MicroSoft'≤ ì
ááááásuppor⌠ oµ Applσ product≤ ha≤ beeε gooΣ iε thσ past whicΦ i≤ wh∙ ╔ ì
áááááwen⌠ witΦ M8░ (par⌠ oµ thσ Assembl∙ Languagσ Developmen⌠ System)« I'φ ì
ááááástill new to assembly language as it is.
ááááá Thi≤ i≤ thσ firs⌠ timσ ╔ havσ releaseΣ anythinτ ╔'vσ writteε s∩ ì
ááááá╔ woulΣ appreciatσ feedbacδ viß EasyPlex/EMai∞ (Use≥ I─ 72356,344).
ááááá - Bob Buckman
ááááá 18 NOV 85