l
7)INTRODUCTIONABOUT THISMANUALTo use the ATARI@ Assembler Editor cariridge effectively, there are fturkinds ofinformation that you must have. Firsi, y
The ATARI 410 Program Recorder i6 an acc€ssory that functions with iheATARI 400 and Lhe ATART 800 Per"onal Computer Systems. The pr oper op
resulting obiecl program. The rhjrd progrdm is.a ed rhe Debugspri ;r helpsyou to monnor and dFbug yolll objen program. The relarionship berween rhesei
),GETTINGSTARTEDALLOCATINGMEMORYThe very lirst.decision you must make when you sii down to write your sourceprogram involves the allocation ofmcDlory
You can find olrr wherF rhis empty memory area is by ryping SrZr mffini.I hree hexade.rmaL number" will be displayed. likF so:SIZEffi0700 0880
IitIIos DosEmptyEdilTexlBufferEmplyDlsplay180Top olBAM YoUi RAMFigure 3. Memory tnap with ttse of LOMEM.This bumping is accomplished wfth a speciat
PROGRAMFORMAT-HO\^/TO WRITE ASTATEMENT.A source program consists of statements. Each statement is ierminated withg:!8W. A statement may be 1-106 ch
There are two ways to hawe the Assembler interpret €ntries as comm€nts. Oneway is ro mal.e lhe entries in lhe commeni field.;hich occupies rhe rema
ERROR CODESERRORCODE ERROR CODE MESSAGE2 Memory insufficient3 Value error4 Too many variabless Stdng length error6 out of data error? Number great
The spacing on ihe pmgramming form is not the same as the spacing to be usedon the screenj controlled by keyboard eDtry. On the screen the classes of
HOW TO \ /RITE This section showshow to write operands. The examples use statemenr numberOPERANDS xxxx (also caled line number xxxx). An insiructi; en
Examplesr10 AND110 F,OR1110 STA$3C26,x20955,YNon-Indexed Indireca operandsln Eeneral. an indjrecl operand is wrilten with pa-rentbeses The address
Exhibit ISample, ReproducibleATARI Programming FormL I N E N O ,LABELOPCODEOPERANDCOMMENT
NOTES:
30USINGTHE EDITORtIIItICOMMANDSEDIT APROGRAMNow that we havc explanrcd how to gct started writire a proeram. rt is uD royou to actually $'ritc t
102nNUM75The eff€ct ofthe NUM commanal stops automatically when a statement numberthat already €xists is reach€d. For examplelRXNLDX *$EFCMP MEMORY
In these examples, the string SoUGHT is delimited (marked ofD by thecharacter /. Actually, any character except space, tab and @ can be used
Sample ProgralnLet us assume you have wdtten a program on an ATARI Programming Form asshown in Figure 6:'lu, IFEure 6. Satnple Prcgrarn a6
COMMANDS TOsAvE (ORDISPLAY) ANDRETRIEVEPROGRAMSThe commands to save (or display) and reideve programs are:I-IST saves or displays a source programP
ASSEMBLER EDITORMANUAL/t\ATARI'OAwame' communicar ons companylveD' etfort has b€en hade to eNure thal thid manu.l .m.ately documenls
The forms ofthe commands to transfer only particdar lines (lines xx to yy) to aLISTTE:,xx,yJrLISTTP:,xx,yJrLISTTC:,xx,J,'yLIST*D:NAIm,xrK,yy whe
PRINT ComnandThis command- is the same as LIST, excepi that it prints statements withoutstatement numbers.Erampl€:EDITPRINT E@* -$3000I,DY '
'where "NAME ' is the aibitrary name you gave to the program rvhen you listedit on the disketi€. This command cleaft the edit te
LOAD/D:NAMELOADralTo retrieve.dn objen program that had preyiously been SAVED aod which hadpre!,rousry Oeen called NAMX, rhe command fu:wfrere NAME i6
NOTES:
USINGTHE ASSEMBLERAsM*[#Dln]:PROGNAME[.SRCl]f,t#PN Il, E Ei IL,t{Dtnl:LrSTlNGI.LSTlllWhere a$embly lisringls to be srored ordisplay€d[,*Dln]:SEIVBL
""f :H'f:is""i".?:,Ti,"1"?:tif; ti?::??":T'":1,j1""trffi :i:19:'f;il"7TAB d
DIRECTIVES(PSEUDOoPERATIoNS)with your Progran Recorder. Iirst transfer the program from programRecorder to the edit text buffer with the comman
The second listed of€ach pair represents the standard or default condiiion.100 . OPT NOLIST The effec1 ofthese directives is to omit from the
To .emove a title, use the following form1000 .TITLE ""The above directive removes titles afier line 1000.The PACt di-re(ljve.on irs owr ca
I]]]lw4)Th€ appearance of this line on the screen will be different only because thescreen has 38 characters positions, while the printer h
LABEL=DIRECTIVEWORD Dlr€ctiveThe WORD directive is the sam€ as the DBYTE directiv€ €xcept that ihe value ofth€ €xpression i6 stored with th€ low
You write *= without the initial "." that the other directives have (exc€piLABEL = ). Also, note that you write * = wiihout any spaces
ASSEMBLY LISTING (.to-coL forrnat)0100 ;CONDITIONAL ASSEMBLY EXAMPI,Eoooo 0120 z = o0000 0130 *= $50005000 A945 0140 LDA r$455002 0150 . rF z@zNoTE
t"- {NOTES:q - {
DEBUGGINGPURPOSE OFDEBUGGERCALLING THEDEBUGGERDEBUGCOMMANDSThe Debugger allow6.you to follow rhe operarion ofan objeci program in derailano ro maKe mt
we now give several examples showing horir to use the commands. In theexamplesj the line8 ending with @ are edtered on the keyboard. Ttre otherlines
This shows that address 5000 contains the nwnber A9.Ifthe second ad&ess (yt?T) is omitted, the contedts ofeight successive locatio4sare Bhorrn. T
The second corrlmand puis 34 and 87 in locations 7008 and 700t resp€ctively.You can conveniently use th€ C command in conjunction with the Di
F.ramplea:I-7000@@Ltut a screen page (20 lines of code) starting atmemory location 7000. Pressing the @ keyduring lisLing halrs rhe lisiing.This f
PREFACEThis manual assum€s the user has read an introductory book on assemblylanguag€. It is not intended to teach assembly language. Sugge
i,i.Because the disassembler starts disassembling from the first address youspecify, you have to take care that the frst address contains the
Exatnple:DEBUGr5ooo l@5000 A9A = 0 3 X = 0 25002 18A = 0 3 X - 0 25003 t5A : 0 3 X = 0 25005 4CA : 0 3 X = 0 27723 00A = 0 3 X = 0 2DXBUGr$03s
NOTES:
APPENDIX 1) * ,ERRORSwhen an elror occrlls, the console speaker giwes a short "beep" and ihe errornumber is displayed.Errors numbered less
140142143145146162165Serial bus input framirg error.Serial bu6 data fiame ov€rrun.Serial data checksum error.Devic€ done effor.Dfukette erlor: Rea
APPENDIX 2| \ulASSEMBLER MNEMONICS(Alphabetic List)BMIBNXADCANDASLBCCBCSBEQBITBPLBRKBVCBVScLcCLDCLICLVCMPcPxCPYDECDEXDEYEORINCINXINYJMPJSRLDALDXLDYLSR
STAsTxSTYTAYTSXTXATXSTYAStor€ Accumul.atorStor€ R€gistex xStor€ R€gister YTransfer Accumulator to R€gister Xtansfer Accumulator to Register YTra[6fe
APPENDIX 3)SPECIAL SYMBOLS)Below we give a lisi of special symbols that have a restricted meaninE io theAssembler. You should avoid using rhese symbol
NOTES:
APPENDIX 4: E 6 q i 5 6 = H ? R !eg;ggFHlIFgnriEESEt5;fiEE+EEEfiEeEEIEFri ti;; !:8PEn;;Eg!cEigiEHf!FElFIgEiEEEEE-H o d g 1 g g * 9 *F ? o e i
NOTES:
APPENDIX 5EXPRESSIONSWheD an insrrucrion or djrefljve calls fora number in the op€rand,lhe numbermay be given as an ,,expafession.', the n*1i**r
NOTES:
)))APPENDIX 6DIRECTIVES. OPT Operandspecifies an option. Operand can be LIST or NOLTST,OBJ or NOOBJ, ERRORS or NOERRORS, EJXCT orNOUECT. (Default
NOTES:
APPENDIX 7ATASCII CHARACTER SETAND HEXADECIMAL TODECIMAL CONVERSION) _.rtr"y01234567BI1 U1 11.2t'n .p"o'o'r+/c.'oGilgil
.$ '"""{"""t"*1/,o! ..sv..\w^}*Y.-ilr' 4)^of o' -$t3 7 73 8 B3 9 93A ..3 8 ;3 C <3 E >3 F ?4
'"$ *'$"do{""$10310410510670710B1091107777727731741 1 51 1 61.1.71 1 87 7 q' 7 2 r/ J Sd$'11 9720121122723724
r.:$735srv.+.c! ^w^v^t.+ O- -t'-a7BBB9BABBBCBDBE8F90919293949596r't..I} -e,o\'- ,{"'.arr' - .,+'A8A9ABADAEAFBOB
A::19920020720220320420520620720820921.O21.721.2213274"-.;$".tt$r"d0'6' - ts.lY orrC7C8C9CBCCCDCECFDOD1D2D3D4D5D6C d*1r&apos
CONTENTSPREFACE1 INTRODUCTIONAbout This BookATARI Peisonal Computer SystemsHow anAssembler Editor Is Used112 GETTING STARTEDAllocating MemoryProgram
.$t .+"t$ .".."$"".*cf231232233234236238239EBE9E7F9FBFCFDFEFFEBECEDEEEFf,'?;::n",'1. ATASCII stands for AT
APPENDIX BREFERENCESATARI PUBLICATIONSObtainabl€ from your ATARI dealer, or ATARI Consumer Division, CustomerSupportJ 1195 Bonegas Avenue, Sunnyva
NOTES:
)APPENDIX 9USING THE ASSEMBLER CARTRIDGETO BEST ADVANTAGE' -#ir$#t{i*lfu i;rt*i#:i':'i'.$"q!'ffi :l:{f *x.r.:"*$$il
show horv to execute some of the most commonly used funclions. Theseprograms are meant only for demonstration purposesr rhey certain)y do nore
1g*tilixflrfr x+*x#l*irffi$il#rf *ff?PEEK(1536J mfig#r*.',f..r;r*:ti11f#*"lfu;g;$tr.#:#.;l lA-USR(1S36, 1, 3): ?A Ggm,ut;***g*$*ffirimg*u*r,
The lasi sample program demonstrai€s a very useful capabiliiy ofthe ATARrPersonal computer System-the display list inierrupt. perhaps you have been i
Now start writing a BASIC program, begin with:2 DIM ES(2179iTher add this subroutine (which you can delete later):25OOO A =90*J+ 1:B =A+89: II B
A = USR(ADR(E$))But there is still another possibl€ hitch. Th€ 6502 machine language code is notfully relocatable; any absolute memory references
70 i WHERE80 ; F Is THE FREQUINCY90 ; A Is THE ATTACK TIMI0100 ; p IS THE PEAK TrME. 0110 ;D rs THE DECAY TIME0720 ;o13O ; ALL TIMES GIVEN IN UMTS
4 USING THE ASSEMBLERThe ASM CommandDirectivesOPT DirectiveTITLE and PAGE DirectivesTAB DirectiveBYTE, DBYTE, and WORD DirectivesBYTEDBYTEw'ORDL
0639 38063"1 E901063C C99F063E D0F10640 600641 A0130643 8a0644 D0rD0646 CA0647 DOFA0649 60064AExample 3.060006100620063006400650 ;0660
iiSi 35"' 3:33 srA xr'oc sroRn rHx RE'u,r3313 ?8Sj :f: :* 1j0u crr x_DrsrANcE rRoM CENTERB:t; i;" 3j* # #, i:'J;:?:i
064E 85CC 09100650 0A 09200651 0A 09300652 65CC 094009500960497009800654 65CD 0990100010100656 A.8 70200657 A5D1 10300659 9158 10400658
000000cc0OcE00cr0230DlOED{OFD4OF0200DOlAD016DO17D018D4OA0600 680616 C80617 C80618 C80619 C80601 AD30020604 85CC0606 AD31020609 85CD0608 A007060D A98A0
062A 4D702 0640 STA VDS]-ST+ 10650 ;0628 A900 0660 LDA /$00O62D 85CE 0670 STA COI,CNT INITIALIZE COLOR COUNTERO62F 85CF 0680 STA DECK IN
APPENDIX 10QUICK REFERENCE:COMMANDS RECOGNIZED BYTHE ASSEMBLER EDITORlll*lilri{t:ffi1#"trfffTi#'t":l$::"Hr*rf Y."1i:r"&q
Cxxxx < yyMxxxx<yryy, zzzzVxxxx< yyr.y, zzzzGxxxxxputs yy into address xxxx.copi€s memory block yyyy t}rroltg}tr zzzz \r]to block starti
APPENDIX 11MODIFYING DOS I TO MAKEBINARY HEADERS COMPATIBLE WITHASSEMBLER EDITOR CARTRIDGEThe following assembly language proqrarfq+'i*$'r:r
To mn this prograrn, you must be in DEBUG mode so, t}T'e the following.. Type BUG and prcss @.. Type c600 and press @.The screen will disp
NOTES:
11 Modifying DOS I to Make Binary HeadersComparible with Assembly Carr;idgeILLUSTRATIONSFigure 2Figure 3Figure 4Figure 5-r-xntolr IFigure 6-rlqure /F
INSTRUCTION SET(oPERAT|ON CODES)A " " ' s . r l . I " i , , " d -l 1l1l Lr!r!' l ! " I ' [ r ] i l &ap
/\ATARTa warner commuf,calions companyO
Commenti su questo manuale