���� VIRTUA� SYSTEMS
���� Be� Grey� Ceda� Mil� Z-Nod� 24
����I� thi� month'� articl� w� ar� goin� t� examin� th� dynamic� o� memor� �
����managemen� a� i� ca� b� applie� t� writin� program� fo� CP/� an� ZCPR� �
����I� m� firs� article� w� briefl� touche� o� th� limitation� place� o� �
����program� becaus� o� memor� siz� restrictions� W� foun� tha� system� �
����wit� � fixe� memory� let'� sa� 64K� requir� larg� program� t� b� �
����segmented� o� "overlayed� i� the� ar� t� fi� i� th� availabl� memory� �
����Thi� ha� th� effec� o� creatin� mor� wor� fo� th� programmer� H� mus� �
����b� awar� no� onl� o� th� program'� functionality� bu� mus� als� b� �
����concerne� wit� "fitting� i� int� availabl� memory.
����Traditionally� programmer� fo� singl�-user� no�-multitaskin� systems� �
����hav� tende� t� assum� tha� al� o� th� memor� fro� th� en� o� th� �
����progra� cod� t� th� Basi� Dis� Operatin� Syste� (BDOS� wa� availabl� t� �
����us� a� desired� Thi� meant� i� reality� th� applicatio� program� coul� �
����"ove�-write� th� Consol� Comman� Processo� (CCP� i� orde� t� gai� th� �
����extr� 2� i� occupies.
����Today� however� w� ar� concerne� wit� maximizin� th� programmer'� �
����efficienc� t� solv� th� proble� a� hand� an� t� minimiz� th� "overhead� �
����h� mus� encounte� t� produc� � workin� application� I� othe� words� w� �
����wis� t� allo� hi� t� writ� program� tha� wil� wor� i� � minimu� memor� �
����size� wit� ver� littl� regar� fo� managin� th� availabl� memor� space.
����Wha� technique� ar� available� Ho� d� w� implemen� them� Wh� ar� thes� �
����method� s� importan� i� th� �-bi� world� Wh� can'� w� g� on� "will�-�
����nilly� th� wa� w� hav� don� fo� th� pas� 1� years?
����Th� answer� t� thes� question� ar� no� obvious� bu� w� ar� al� �
����painfull� awar� o� th� implications� Limite� memor� spac� mean� �
����restrictin� th� applicatio� program� t� ru� i� th� availabl� memor� �
����space� A� � result� w� ofte� compromis� th� functionalit� o� a� �
����applicatio� t� conserv� space� Yet� w� wan� th� progra� t� b� �
����operationa� o� th� broades� cros�-sectio� o� �-bi� CP/� machine� wit� �
����a� muc� functionalit� a� i� possible.
����Befor� w� ca� reall� conside� "how� t� d� thes� things� w� mus� firs� �
����loo� a� th� wa� standar� CP/� system� currentl� "loa� an� execute� th� �
����program� w� run� An� i� orde� t� reall� loo� a� thi� problem� w� reall� �
����nee� t� kno� wha� th� "memor� image� normall� look� like.
����[Ther� ar� severa� system� tha� d� no� adher� t� th� "general� rule� � �
����wil� discuss� notabl� som� o� th� earl� Northsta� Systems� However� i� �
����yo� hav� on� o� thes� earl� systems� yo� alread� kno� th� differences.]
����Memor� i� �-bi� computer� generall� begin� a� addres� 0000� (th� � �
����stand� fo� hexadecima� o� bas� 16� an� goe� t� addres� FFFFH� I� thi� �
����hexadecima� numbe� i� converte� t� it'� decima� equivalent� w� fin� �
����tha� i� i� equa� t� 65,53� o� 64� (1� i� computeres� � 102� bytes).
�
����I� man� curren� systems� th� operatin� syste� (OS� build� fro� th� to� �
����(FFFFH� dow� towar� th� botto� (0000H)� Th� memor� i� consecutive� o� �
����sequential� o� contiguous� Tha� is� ther� ar� n� gap� i� i� fro� th� �
����lowes� byt� t� th� highes� byte.
����Moreover� man� o� th� O� segment� ar� � fixe� size� Fo� example� i� th� �
����mos� commo� implementation� th� CC� requre� � 25�-byt� pages� o� 204� �
����bytes� Th� BDOS� require� 1� 25�-byt� pages� o� 3584 bytes� Th� BIOS� �
����o� th� othe� hand� ha� � "variable� size� an� generall� run� abou� 409� �
����bytes� an� dis� buffer� perhap� a� muc� a� 204� bytes� Ther� i� on� �
����mor� area i� memory� Pag� 0� tha� i� reserve� fo� "communication�"�
����betwee� th� O� an� applicatio� program� i� i� fixe� a� 25� bytes.
����Fo� purpose� o� discussin� th� CP/� (ZRDOS� OS� i� i� generall� easie� �
����t� thin� o� memor� fro� to� t� bottom� whil� fo� applications� w� wan� �
����t� conside� memor� fro� th� botto� t� th� top...
����Base� o� th� previou� discussion� then� w� fin� � "typical� memor� �
����imag� t� loo� somethin� lik� th� following:
���� FFF� +-----------------------------+
���� � |
���� � Dis� Buffer� � 204� � 2.0k)
���� � |
���� F800 +-----------------------------+
���� � |
���� � BIO� � 409� � 4.0k)
���� � |
���� E80� +-----------------------------+
���� � |
���� � BDO� � 358� � 3.5k)
���� � |
���� DA0� +-----------------------------+
���� � |
���� � CC� � 204� � 2.0k)
���� � |
���� D20� +-----------------------------+
���� � |
���� | TP� � � 5340� (52.5K)
���� � |
���� 010� +-----------------------------+
���� � |
���� � Pag� � � 25� (0.25k)
���� � |
���� 000� +-----------------------------+
����Bea� i� mind� however� thi� i� � "theoretical� syste� layout� an� i� �
����NO� indicativ� o� th� syste� yo� ma� b� using� I� i� provide� merel� �
����fo� purpose� o� discussion� W� wil� develo� a� imag� tha� wil� matc� �
����you� ow� syste� nex� month� TP� stand� fo� Transien� Progra� Are� an� �
����i� th� are� i� memor� wher� applicatio� program� load.
�
����Befor� w� ca� reall� begi� ou� project� w� nee� t� kno� jus� � littl� �
����mor� abou� th� pag� � an� wha� i� contains� Rathe� tha� presen� i� i� �
����graphi� form� I'� goin� t� illustrat� i� wit� assemble� statement� s� �
����w� ca� us� thi� informatio� i� writin� futur� programs.
����� d� no� inten� t� explai� th� rudiment� o� assemble� languag� syntax� �
����yo� shoul� stud� you� manual� an� yo� shoul� fee� fre� t� contac� m� �
����whe� yo� hav� questions� � woul� prefe� yo� d� thi� b� callin� Ceda� �
����Mil� Z-Nod� 2� [503� 644-462� an� leavin� � messag� t� AL� USERS.....
����[Note� th� followin� cod� exampl� wa� produce� usin� WordSta� (tm� an� �
����shoul� no� b� "extracted� fro� th� articl� t� assemble� Instead� � �
����separat� fil� calle� PAGE0.MA� (o� .Z80� wil� b� provide� t� assemble.]
���� TITL� 'PAG� � Definition� � CP/� Compute� Systems'
����� Progra� -------------� � Note� Undefine� a� moment
����� Segmen� Pag� 0
����� Autho� Be� Grey
����� Languag� Z8� Assembler
����� Dat� 0� AP� 88
����� Previou� None
����� Conditiona� Definitions
����N� EQ� 000� � Defin� NO
����YE� EQ� no� N� � Defin� YES
����� Assemble� Definition
����M8� EQ� N� � MicroSoft
����SL� EQ� ye� � SL� Systems
����ZA� EQ� N� � Echelon
����� Versio� Levels� Date
����VERS� EQ� 0� � Versio� Number
����REVS� EQ� 0� � Revisio� Level
����VMNT� EQ� 0� � Versio� Month
����VDAT� EQ� 0� � Versio� Date
����VYEA� EQ� 8� � Versio� Year
����� Operatin� Syste� Definitions
����CPM2� EQ� N� � CP/� Versio� 2.2
����CPM3� EQ� N� � CP/� Versio� 3.� (CP/M+)
����ZCPR� EQ� ye� � Usin� ZCP� 3.x
����ZRDO� EQ� ye� � Usin� ZRDO� 1.x
����BAS� EQ� 000� � Bas� o� Memory
����CC� EQ� BASE+0D200� � Bas� o� CCP
����BDO� EQ� CCP+0800� � Bas� o� BDOS
����BIO� EQ� BDOS+0E00� � Bas� o� BIOS
�
����� Star� o� Pag� 0
���� i� M8�
���� .Z80
���� ASEG
���� OR� 0000
���� endif
����RST� EQ� � � Restar� Vecto� 0
����WBOOT� J� BIOS+� � War� Boo� Entry
����IOBTYE� D� 0� � Input/Outpu� Byte
����USRDSK� D� 0� � M� Nybbl� � User� L� Nybbl� � Disk
����BDOSV� J� BDOS+� � BDO� Functio� Call
����RST1� D� � � Restar� Vecto� 1
����RST2� D� � � Restar� Vecto� 2
����RST3� D� � � Restar� Vecto� 3
����RST4� D� � � Restar� Vecto� 4
����RST5� D� � � Restar� Vecto� 5
����RST6� D� � � Restar� Vecto� 6
����RST7� D� � � Restar� Vecto� � (Debu� Utilities)
���� D� 1� � 004� � 004F
���� D� 1� � 005� � 005B
����FCB1� D� 1� � Defaul� FC� 1
����FCB2� D� 1� � Defaul� FC� 2
���� D� 0� � 007� � 007F
����DMABFR� D� 12� � 008� � 00FF
���� END
����Thi� exampl� o� cod� actuall� generate� � Pag� 0� Thi� i� NO� somethin� �
����w� normall� nee� t� d� fo� ourselves� sinc� th� O� wil� alway� insur� �
����th� correc� value� ar� store� i� thi� area� I� i� fo� illustratio� onl� �
����an� i� intende� t� b� � littl� introductio� a� t� styl� an� form� Mos� �
����o� i� i� sel� explanatory� an� � wil� minimiz� m� descriptio� o� it.
����I� general� al� program� w� writ� wil� begi� th� sam� way� � TITL� an� �
����� brie� fe� line� o� wha� th� program'� nam� is� wh� wrot� it� wha� th� �
����languag� use� is� th� dat� an� som� commen� abou� previuo� versions� I� �
����desired� � fe� (ver� few� line� ca� b� adde� t� addres� it� function:
����� Progra�
����� Segmen� Pag� 0
����� Autho� Be� Grey
����� Languag� Z8� Assembler
����� Dat� 0� AP� 88
����� Previou� None
������ Functio� Thi� i� � cod� segmen� t� illustrat� th� content� of
����� th� CP/� Pag� 0� I� i� "never� compile� i� rea� life.
����Eve� experience� programmer� tak� tim� t� creat� th� abov� sectio� i� �
����EVER� progra� the� write� Thin� abou� it..� Woul� yo� remembe� al� o� �
����th� stuf� fiv� o� eve� te� year� fro� now� Probabl� not� an� thi� bi� �
����o� documentatio� serve� t� infor� th� reader� a� wel� a� refres� ou� �
����ow� memorie� i� th� future� I� i� � goo� programmin� practice� D� it!
����Th� nex� tw� statement� ar� directive� t� th� assembler� definin� tw� �
����commonl� use� values� YE� an� NO� W� coul� hav� define� O� an� OF� o� �
����eve� TRU� an� FALS� i� th� sam� way.
����� Conditiona� Definitions
����N� EQ� 000� � Defin� NO
����YE� EQ� no� N� � Defin� YES
����OF� EQ� 000� � Defin� OFF
����O� EQ� no� OF� � Defin� ON
����O� w� coul� d� somethin� lik� this:
����TRU� EQ� YE� � Defin� TRUE
����FALS� EQ� N� � Defin� FALSE
����Thes� statement� wil� permi� u� t� conditionall� selec� certai� option� �
����i� th� progra� a� late� points�
����Th� followin� thre� statement� defin� whic� assemble� w� wil� us� whe� �
����w� pu� th� progra� together� Onl� ON� o� th� option� shoul� b� YES� th� �
����res� shoul� b� NO� Already� w� ar� usin� th� conditional� w� define� i� �
����th� las� fe� line� o� code� Wh� d� this� Wel� becaus� i� i� importan� �
����fo� other� t� kno� "how� yo� assemble� th� program� an� wha� assemble� �
����yo� used� No� al� assembler� ar� create� equal!
����� Assemble� Definition
����M8� EQ� N� � MicroSoft
����SL� EQ� ye� � SL� Systems
����ZA� EQ� N� � Echelon
����I� thi� case� � us�d on� o� th� SL� Systems� assemblers� SLR180+� � �
����virtua� memor� assembler� Al� SL� assembler� us� th� sam� syntax� I� �
����yo� ar� usin� M80� the� yo� woul� se� M8� EQ� yes� an� SL� EQ� NO� Th� �
����sam� rule� prevai� i� th� cas� o� th� las� equat� fo� ZAS� th� Echelo� �
����Inc.� product� Ther� coul� b� other� adde� t� th� lis� a� well� bu� fo� �
����ou� purposes� thes� ar� th� onl� thre� assembler� tha� wil� concer� us.
����Recal� m� discussin� versio� an� revisio� level� a� � par� o� th� fil� �
����name� Wel� insid� th� progra� i� i� necessar� t� identif� th� sam� tw� �
����values� I� addition� I'v� include� th� Versio� Dat� s� w� ca� tel� whe� �
����w� las� modifie� th� program� Yo� shoul� ge� i� th� habi� o� updatin� �
����thes� value� EVER� tim� yo� edi� th� program� I� desired� th� tim� may
����als� b� added� alth� no� required:
�
����� Versio� Levels� Date� Time
����VERS� EQ� 0� � Versio� Number
����REVS� EQ� 0� � Revisio� Level
����VMNT� EQ� 0� � Versio� Month
����VDAT� EQ� 0� � Versio� Date
����VYEA� EQ� 8� � Versio� Year
����VHOU� EQ� 0� � Versio� Hour
����VMIN� EQ� 0� � Versio� Minutes
����VSEC� EQ� 0� � Versio� Seconds
����Sinc� w� wil� b� writin� program� t� ru� unde� bot� CP/� an� ZRDOS� an� �
����wil� probabl� b� usin� bot� th� standar� CC� an� ZCPR� w� shoul� defin� �
����thes� value� also� Thi� i� � furthe� ai� t� documentation� A� thi� �
����point� i� i� no� significant� bu� late� i� wil� becom� quit� important.
����CPM2� EQ� N� � CP/� Versio� 2.2
����CPM3� EQ� N� � CP/� Versio� 3.� (CP/M+)
����ZCPR� EQ� ye� � Usin� ZCP� 3.x
����ZRDO� EQ� ye� � Usin� ZRDO� 1.x
����Th� nex� se� o� equate� defin� som� o� th� importan� an� ofte� use� �
����addresse� i� ou� systems:
����BAS� EQ� 000� � Bas� o� Memory
����CC� EQ� BASE+0D200� � Bas� o� CCP
����BDO� EQ� CCP+0800� � Bas� o� BDOS
����BIO� EQ� BDOS+0E00� � Bas� o� BIOS
����BAS� define� th� "bottom� o� "beginning� o� memory� Notic� tha� th� CC� �
����equat� i� define� a� th� BASE+0D200H� Thi� i� don� s� tha� th� progra� �
����ca� kno� no� onl� wher� th� CC� i� located� bu� als� t� kee� th� �
����"symbol� CC� � relocatabl� item� (I'l� discus� relocatabilit� later.�
����Likewise� th� BDO� addres� i� a� "offset� o� fixe� valu� fro� th� CCP� �
����an� sinc� w� kno� th� CC� i� 204� bytes� o� 8*256� (not� tha� 25� i� �
����hex i� 100� s� w� ad� 8*10� (0800H� t� th� CC� beginnin� address� t� �
����fin� th� beginnin� o� th� BDOS� W� als� kno� tha� th� BDO� i� 1� 25�-�
����byt� page� (1� i� hex i� 0E� s� 0E*10� � 0E00H).
����I� w� als� wishe� t� includ� th� usua� 2� o� buffe� spac� generall� �
����foun� afte� th� BIOS� w� coul� ad� on� mor� equat� ..� however� w� �
����woul� hav� t� kno� EXACTL� ho� bi� th� BIO� is� an� roun� i� u� t� th� �
����nex� eve� 1� boundary� W� hav� assume� � 4� BIO� s� w� woul� have:
����BAS� EQ� 000� � Bas� o� Memory
����CC� EQ� BASE+0D200� � Bas� o� CCP
����BDO� EQ� CCP+0800� � Bas� o� BDOS
����BIO� EQ� BDOS+0E00� � Bas� o� BIOS
����EPRO� EQ� BIOS+1000� � Bas� o� EPRO� o� Buffers
����[Note� i� 2� � 8*256� the� 4� � 16*256� thu� 10*10� � 1000H.)
�
����Confused� � hop� not� Hexadecima� arithmeti� i� discusse� i� nearl� �
����ever� compute� textboo� � hav� eve� seen� Remember� whe� dealin� wit� �
����computers� the� "think� i� bas� 1� (hexadecimal)� no� bas� 1� (decimal� �
����lik� w� do� S� yo� ask� wh� couldn'� w� us� decima� number� t� defin� �
����thes� values� Th� answe� i� w� could� bu� sinc� w� ar� talkin� abou� �
����th� rea� hardware� an� wil� b� concerne� abou� "rea� memory� addresses� �
����i� i� mor� appropriat� t� wor� i� hexadecima� values� Afte� all� th� �
����outpu� o� th� assembler� alway� provide� u� wit� th� he� value� i� th� �
����listin� (NEVE� th� decima� ones)...
����Th� nex� fe� statement� ar� significan� i� yo� ar� usin� M8� a� th� �
����assembler� The� ar� NO� require�
fo� SL� o� ZA� an� therefor� w� wan� �
����t� mak� the� "conditional� o� th� assemble� w� ar� using� Tha� is� i� �
����w� ar� usin� M80� the� thes� statement� wil� b� used� i� w� ar� not� �
����the� wil� no� b� used� Pleas� not� th� style� th� conditiona� "if� i� �
����offse� on� column� an� i� i� "lowe� case"..� Thi� make� i� eas� t� fin� �
����i� � larg� listin� (ditt� fo� th� "endif").
���� i� M8�
���� .Z80
���� ASEG
���� OR� 0000
���� endif
����I� th� cas� o� M80� whic� ca� assembl� bot� 808� Inte� an� Z8� Zilo� �
����mnemonics� w� nee� t� infor� i� whic� se� o� mnemonic� w� ar� using� I� �
����ou� case� w� wil� ALWAY� us� th� Zilo� codes� (Th� .Z8� directive)
���Th� ASE� statemen� tell� M8� tha� thi� i� a� "absolute� segment� I� i� �
����no� require� b� th� othe� tw� assemblers�
����Th� OR� statemen� tell� M8� wher� i� memor� w� wan� thi� cod� located� �
����Thi� directiv� cause� M8� t� pu� � specia� valu� i� th� relocatabl� �
����fil� tha� wil� b� generate� b� th� assembler� s� tha� L80� th� linke�, �
����wil� b� abl� t� "place� i� i� th� prope� memor� area� namel� Pag� 0.
����No� w� hav� th� basi� definitions� w� wil� examin� jus� wha� i� i� Pag� �
����0� an� wha� th� value� mean...
����RST� EQ� � � Restar� Vecto� 0
����WBOOTE� J� BIOS+� � War� Boo� Entry
����IOBTYE� D� 0� � Input/Outpu� Byte
����USRDSK� D� 0� � M� Nybbl� � User� L� Nybbl� � Disk
����BDOSFV� J� BDOS+� � BDO� Functio� Call
����RST1� D� � � Restar� Vecto� 1
����RST2� D� � � Restar� Vecto� 2
����RST3� D� � � Restar� Vecto� 3
����RST4� D� � � Restar� Vecto� 4
����RST5� D� � � Restar� Vecto� 5
����RST6� D� � � Restar� Vecto� 6
����RST7� D� � � Restar� Vecto� � (Debu� Utilities)
����� D� 1� � 004� � 004F
���� D� 1� � 005� � 005B
����FCB1� D� 1� � Defaul� FC� 1
����FCB2� D� 1� � Defaul� FC� 2
���� D� 0� � 007� � 007F
����DMABFR� D� 12� � 008� � 00FF
���� END
����Th� firs� line� define� (informationally� wher� th� firs� Restar� �
����Vecto� begins� I� jus� s� happens� thi� i� th� sam� addres� wher� th� �
����jum� t� th� BIO� War� Boo� Entr� i� found� Th� EQ� � say�: assig� th� �
����addres� o� th� Progra� Counte� (000� a� thi� point� t� th� labe� RST0.
����RST� EQ� � � Restar� Vecto� 0
����Th� nex� lin� define� th� labe� WBOOT� (war� boo� entry� a� � jum� (JP� �
����t� th� BIOS+3� I� yo� looke� a� th� beginnin� o� th� BIOS� yo� woul� �
����se� tha� i� begin� wit� � serie� o� jum� instructions� pointin� t� th� �
����variou� function� th� BIO� provides� Normally� w� d� no� concer� �
����ourselve� wit� thi� information� becaus� th� BDO� als� know� abou� �
����thi� jum� table� an� whe� w� mak� � functio� cal� t� BDOS� i� locate� �
����th� BIO� an� provide� th� necessar� linkag� fo� us.
����WBOOT� J� BIOS+� � War� Boo� Entry
����Th� nex� lin� define� th� labe� IOBYTE� I� i� define� a� � singl� byt� �
����(D� � Defin� Byte� wit� � valu� i� th� byt� o� 00H� Thi� byt� i� ofte� �
����use� b� th� BIO� an� othe� application� t� "r�-direct� th� input/outpu� �
����o� � program� (I� standar� CP/� systems� th� STA� comman� manipulate� �
����th� content� o� thi� byte.)
����IOBTYE� D� 0� � Input/Outpu� Byte
����Th� labe� USRDS� define� tw� values� th� fou� leftmos� bit� contai� th� �
����curren� "use� area� an� th� fou� rightmos� bit� defin� th� curren� �
����"disk� (th� logge� i� o� defaul� disk)� Whe� � byt� i� divide� int� tw� �
�����-bi� values� w� refe� t� the� a� th� Mos� Significan� (MS� an� Leas� �
����Significan� (LS� Nybble� Perhap� a� illustratio� wil� b� helpful:
����USRDSK� D� 0� � M� Nybbl� � User� L� Nybbl� � Disk
���� Use� Disk
���� M� Nybbl� --> 000� 000� <-� L� Nybble
���� Bi� � ----� \---� Bi� 0
����Th� nex� lin�
����BDOSFV� J� BDOS+� � BDO� Functio� Call
�
����define� th� entr� poin� t� th� BDO� tha� w� cal� t� hav� a� O� functio� �
����performe� fo� us� Mos� program� loa� � "functio� code� int� Registe� C� �
����an� appropriat� informatio� i� th� othe� register� an� the� perfor� th� �
����instruction:
���� CAL� BDOSF� � Perfor� Functio� Call
����Fo� example� suppos� w� wan� t� kno� i� � characte� i� waitin� o� th� �
����consol� fo� input� W� migh� us� Functio� Cod� 1� (Rea� Consol� Status� �
����t� determin� this� Th� cod� woul� be:
���� L� C,1� � F� � Consol� Status
���� CAL� BDOSF� � Perfor� O� Function
����Whe� contro� i� returne� t� u� fro� th� OS� (righ� afte� th� CALL)� w� �
����wil� hav� � valu� i� Registe� A� I� i� i� 00� n� characte� wa� waiting� �
����i� i� i� NO� 00� the� � characte� i� waiting� Bu� � digress� W� onl� �
����hav� � fe� mor� line� o� cod� t� go� an� w� wil� hav� complete� thi� �
����article...
���Unfortunately� thi� kin� o� explanatio� require� lot� o� word� an� �
����examples� Th� content� o� Pag� � ar� s� ver� important� � wante� t� �
����star� wit� i� s� yo� wil� understan� som� o� th� mor� rudimentar� �
����location� i� you� memor� image.
����Th� nex� seve� line� represen� th� remainin� Restar� Vectors� Ther� ar� �
����eigh� o� the� i� th� Z8� machine� I� genera� the� ar� unuse� a� presen� �
����i� mos� machines� However� wit� th� ne� O� an� som� ne� applications� �
����thes� byte� wil� b� used� (D� � Defin� Storag� i� bytes)
����RST1� D� � � Restar� Vecto� 1
����RST2� D� � � Restar� Vecto� 2
����RST3� D� � � Restar� Vecto� 3
����RST4� D� � � Restar� Vecto� 4
����RST5� D� � � Restar� Vecto� 5
����RST6� D� � � Restar� Vecto� 6
����RST7� D� � � Restar� Vecto� � (Debu� Utilities)
���Th� nex� tw� lines� merel� allocat� 2� byte� o� memory� Nothin� o� an� �
����interes� i� i� them� Th� addresse� t� th� right� i� th� comment� area� �
����merel� indicat� wha� "memor� locations� the� allocate.
���� D� 1� � 004� � 004F
���� D� 12 � 005� � 005B
����Als� locate� i� Pag� � ar� tw� "default� Fil� Contro� Blocks� a� �
����addresse� 005C� an� 006CH� Thes� FCB� ar� generall� fille� i� b� th� �
����CC� i� w� hav� specifie� "arguments� o� th� comman� line� � wil� no� �
����bothe� wit� � discussio� o� thei� structur� a� thi� time� W� wil� cove� �
����i� i� detai� a� � late� time.
����FCB1� D� 1� � Defaul� FC� 1
����FCB2� D� 1� � Defaul� FC� 2
�����Next� ar� fou� bytes� merel� allocatin� memor� a� above:
���� D� 0� � 007� � 007F
����An� lastl� come� th� defaul� Direc� Memor� Acces� Buffer� Thi� i� th� �
����are� wher� CP/� generall� store� � recor� rea� fro� on� o� th� flopp� �
����disk� (o� har� disk)� I� i� ALWAY� 12�-bytes� becaus� CP/� think� ALL �
����physica� record� ar� 128-byte� i� length�
����DMABFR� D� 12� � 008� � 00FF
����The� th� assemble� directive� END� t� defin� th� obvious� th� en� o� �
����th� program.
���� END
����I� thi� month'� article� � hav� describe� th� basi� layou� o� memor� �
����an� th� content� o� Pag� 0� Nex� month� w� wil� begi� � "real� progra� �
����an� discus� mor� memor� management� I� yo� d� no� hav� BUFFERS.DO� a� �
����thi� time� yo� migh� retriev� i� fo� nex� month� column.
����You� assignment� Yo� shoul� tr� t� assembl� thi� progra� an� prin� ou� �
����th� resultin� listing� Kee� i� hand� fo� th� future� a� w� wil� refe� �
����t� i� ove� an� ove� again� I� yo� d� no� hav� M80� SL� o� ZAS� yo� ca� �
����ge� � cop� o� th� compile� listin� fil� fro� m� �-Node�
���Yo� mus� hav� � printe� capabl� o� printin� � minimu� o� 12� columns� �
����Mos� 8� colum� do�-matri� machine� ca� b� se� t� "condensed� mod� an� �
����wil� wor� fine� Th� fil� ca� b� printe� wit� PI� an� ha� imbedde� ^� �
����(Contro�-L� a� appropriat� place� t� caus� � For� Fee� (ne� page)� Th� �
����sourc� cod� fo� thi� fil� i� als� availabl� o� m� �-Node� Acces� �
����Programmin� an� PE�-3� Refe� t� you� printe� manua� o� documentatio� o� �
����PI� fo� mor� printin� details.
����On� mor� poin� o� interest� Som� assembler� displa� th� assemble� �
����addres� a� i� i� actuall� store� i� memory� lo� byte� the� hig� byte� �
����Th� SL� assembler� ca� displa� i� bot� ways� � chos� t� sho� i� a� �
����hig�-byt� an� lo�-byte� simpl� becaus� i� i� easie� t� read� M80� �
����however� doe� jus� th� opposite.