CCSA EDITOR/ASSEMBLER PROGRAM

                          USER MANUAL

                     Version 2.7 - 3/16/82

    program written by: Doug Moser, Mercer Country College
      manual written by: Sol Libes, Union County College


INTRODUCTION
       Computer� ar� instructe� (programmed� wit� binar�� bit� �
(e.g�� 01011011)��  � hexidecima� cod� (e.g�� 5D� ca� b� use� t� �
represen� th� binar� instructio� cod� (01011011=5D)��  W� ca� �
writ� shor� program� i� binar� cod� an� indee� thi� i� th� wa� i� �
wa� don� i� th� ver� earl� days�� bu� th� metho� i� ver� pron� t� �
error��  Usin� he� cod� simplifie� th� tas� an� i� practica� fo� �
simpl� programs��  However�� compute� professionals�� wh� writ� �
larg� an� ofte� comple� programs�� us� � progra� calle� a� �
ASSEMBLE� whic� permit� the� t� writ� compute� instruction� usin� �
nmemonics��  Th� assemble� convert� th� nmemoni� cod� (assembl� �
language� int� th� binar� cod� tha� th� compute� executes.
       A� EDITO� progra� allow� th� use� t� writ� th� nmemonic� �
(calle� SOURC� CODE� int� � FIL� i� th� computer'� memory��  Th� �
Assemble� wil� tak� th� source-cod� fil� an� assembl� i� int� th� �
he� cod� (calle� OBJEC� CODE� int� anothe� are� i� th� computer.
       A� assemble� progra� offer� man� othe� advantage� an� ha� �
som� disadvantages��  Th� use� shoul� rea� Chapte� � o� Lanc� A� �
Leventhal'󠠠 boo렠 title䠠 "8080A/808��� Assembl���� Languag� �
Programming"�  Als� rea� Chapte� � o� ho� t� us� a� Assemble� an� �

    Note�� Thi� editor/assmble� wil� assembl� 808� an� TD̠ Z-8� �
nmemonics�  I� wil� no� assembl� th� 808� RI� an� SI� instructions.


LOADIN� THE EDITOR/ASSEMBLER
    Firs� loa� CP/� DO� program��  Inser� dis� wit� ED/AS� file�  �
Typ� ED/ASM� followe� b� th� fil� nam� (u� t� �� characters)�  �
Th� fil� mus� b� a� "ASR� typ� file��  I� yo� d� no� provid� � �
fil� nam� a� erro� messag� wil� b� displaye� an� contro� return� �
t� th� CP/� operatin� system.

    examples:  A>ED/ASM TEST<cr>
               A>ED/ASM B:TEST<cr>

    I� th� firs� exampl� loa� th� Editor/Assemble� an� th� AS� �
fil� name� "TEST� fro� th� curren� logged-i� drive��  I� th� �
secon� exampl� i� wil� loa� TES� fro� driv� B��  I� th� progra� �
TEST does not already exist ED/ASM will open the file.

    The program will then sign on with the message:

    CCSA Editor Assembler V2.7
    [NEW FILE]
    TEST 1C00 1C00 �
    Th� Editor/Assemble� wil� als� sho� th� fil� nam� an� th� �
startin� an� endin� hexidecima� addresse� o� th� sourc� cod� fil� �
i� memory��  I� thi� i� � ne� fil� ,suc� a� th� example� the� th� �
startin� an� endin� addresse� wil� b� th� sam� sinc� nothin� ha� �
a� ye� bee� entere� int� th� fil� space.


SYSTEM MEMORY USAGE

    Th� Editor/Assemble� progra� i� approximtel� 5Kbyte� i� siz� �
an� als� use� � fe� hundre� additiona� byte� fo� storin� it� �
symbo� table��  Th� CCS� Editor/Assemble� wil� no� allo� th� use� �
to overwrite either itself or the CP/M operating system.


CCSA Editor/Assembler COMMANDS

ASS� ma�� assemble� progra� a� specifie� memor� locatio� (ma� an� �
    list� o� th� console��  �

ASSME ma: same as ASSM except only shows lines with errors.

ASSML ma: same as ASSM except lists on printer.

EXIT: closes current temporary file and returns user to CP/M.

FILE� show� curren� fil� nam� an� startin� an� endin� addresse� �
    in source code file buffer.

FORM� turn� o� fiel� formatte� fo� sourc� cod� listing��  Th� �
    formatter is on when the CCSA Editor/Assembler is loaded.

FSET: moves file buffer pointer to end of the file.

GOT�: wil� permi� use� t� g� directl� t� � specifie� memor� �
    locatio� an� continu� executio� a� tha� point�  Fo� example� �
    GOTϠ F00� wil� caus� � jum� t� memor� locatio� F000he�� an� �
    continue execution from that memory location.

LIST: lists program on console.  Type Control-E to abort listing.

LISTL: same as LIST except lists to printer.

LISTP�� list� progra� o� consol� wit� paus� afte� eac� line�  �
    Pres� spac� ba� t� se� nex� line��  Pres� retur� ke� t� en� �
    listing.

LOAD�� allow� loadin� � fil� fro� th� CCS� Editor/Assembler�� I� �
    yo�� wis� t� kee� curren� fil� SAVŠ i� befor� loadin�      �
    ne� file.

NFOR: turns field formatter off.

SAVE� mus�  b�  type� t� sav� curren� file��  N� fil� nam� i� re-��     quired���Not� tha�typin� EXIԠ return� contro젠t� CP/�
    an� close� th� temporar� (.$$$� file�� i� doe� no� sav�           �
    curren� file�




CONTROL KEY FUNCTIONS

    H    backspace
    E    abort listing
    Q    Continue listing if temporarily stopped
    S    temporarily stop listing



ASSEMBLER PSEUDO OP CODES

label ORG ma       defines origin memory address of program.

label EQU ma or n  assign ma or n value to symbol label.

END                marks end of program.

ASà 'string��     put� characte� strin� i� RA͠ (onl�� firs� �      �
                   character� ar� displayed).

DB n               saves an 8-bit word in RAM.

DS n               reserves n memory locations for future use.

DW n�              save� � 16-bi� wor� i� RA͠ (lo-byte/hi-byt� �
                   format).



USING THE EDITOR

    There are five fields in the source code format.  They are:

       line #  label  Op-code  Operand  Comment<cr>

    Line numbers may be any number between 0 and 9999.
    Labe� i� � character� maximum��  I� n� labe� i� use� enter � �
         spaces to skip over label field.
    Be sure to leave one space between each field.
    Commen� line� ma� b� inserte� b� enterin� a� "*�� i� th� �
    label field.



OPERANDS

    Operand� ma� b� symbols� label� o� values�  � symbo� mus� b� �
identified with an EQU statment, as in the following example: �
    10 PORT EQU 0FFH
    20 MON  EQU 0F01EH
    .   .    .    .
    .   .    .    .
    80      OUT PORT
    90      LXI H,MON

    �� labe� mus� b� identifie� elsewher� i� program��  Fo� �
example:

    100     JMP END
     .       .   .
     .       .   .
    500 END HLT

    Numeri� value� ar� assume� t� b� decima� value� unles� �
followe� b� letter� � (hex)�  I� firs� characte� i� operan� i� a� �
alph� characte� i� mus� b� precede� b� "0"��  Her� ar� som� ex�
amples:

    300       MVI A,20
    310       MVI C,10H
    320       MVI H,0A000H

    Add�� subtract� multipl� an� divid� (+� -� *� /� symbol� ca� �
b� used�  Arithmeti� operator� ar� execute� lef� t� righ� withou� �
precedence��  Th� smybo� "$� mean� PC-addres� afte� operation� �
Her� ar� som� examples:

    200       JMP HOME+5
    220       JMP $+10


COMMENT LINES

    Us� th� symbo� "*� t� indicat� commen� lines�  Her� is an �
example:

    10 * THIS IS THE START OF THE PROGRAM
    20 START LXI SP,1000H INITIALIZE STACK POINTER



ASSEMBLER ERROR CODES

    A    Argument error
    D    Duplicate error
    L    Label error
    M    Missing label
    O    Opcode error
    R    Register error
    S    Syntax error
    U    Undefined error
    V    Value error �