@LÌ}ˬð5 _­¬Š$ŽŠ%Ž l0¬±$)ªÈ$ð±$Hȱ$ UhšŠL"©À š`©€e$…$æ%`­…$­…%` Œ ©R @©W €Š!àÐ( L¹(©Œ©1© ©€  ­ YäÎ ðŠI˜` ­ d  LÇd M  Œ* €@ ÿ­ …$­ …%­ …C¢©C ‘$¥$)¥%1© U©dÊߥ$9¥%:¬ ¢ˆ˜!0 SèàÐñ¥$ç¥%è©š™Èúš¹ð ÉDðÈÈÈÀÐð©D™©Ë™©™` ­ }œJ‚)ðLr ìœ‚É FK „                   }                          }        BINARY PROGRAMMING››being a tutorial series on the functioning of your Atari's 6502} Central Processor Unit (CPU) chip and Assembly Language Programming.››consisting of the three programs:› - NANOPROCESSOR› } - NANOASSEMBLER› - NANOEDITOR››as originally appearing in Home Computer Magazine, Volume 5, Nos. 5 & 6››(c) 1985, Emerald } Valley Publishing Company› Eugene, Oregon››as entered and uploaded by Charles A. Cole, Sierra Vista, AZ 85635›››Ô }èå_ÎÁÎÏÐÒÏÃÅÓÓÏÒ:›› Since the premier of the movie TRON - in which the hero has to fight his way out of a computer's micro }circuits - many people have held a fascination for the inner workings of this "thinking machine." Are you one of them? Perh }aps your interest has always been there, but you have not yet taken the plunge into machine-level programming. Or perhaps yo }u know a great deal about this subject already, but would appreciate a very clear and simple demonstration of how computers "}think." If so, you're ready for NANOPROCESSOR (NP) - a program that emulates the computer at its most fundamental level.›› } At the heart of a computer there is nothing but an immense set of on and off switches. But how can such a simple foundation} foster such a complex information-handling system? In short, how are all these switches organized? A "real" computer, such} as the one you have at home, is such a large system that it would be difficult to see the forest for the trees. But, with N}P, you have a chance to operate and see a much-simplified model of how a computer performs its tasks.›››ÂÒÁÉÎ_ÃÅÎÔÒÁÌ:›› }All computers - including the NP - have a central "brain." It's called the Central Processing Unit (CPU). This brain recogn}izes and responds to different sets of numbers as instructions. These instructions direct the CPU to carry out certain opera}tions - much as our brains store, handle, and act on information encoded in switch-›like neurons. In a computer, information} travels along parallel paths of wires and printed circuits called "buses."›› As humans, we may think in English, Spanish, }or any other language - some subtle, some exact. Computers also "think" in languages - such as BASIC and LOGO. CPUs like ou}r own brains, must translate these high-level languages into encoded information. In computers, this information takes the f}orm of machine language - a set of codes and numerical values expressed as binary numbers. Binary means "two," and implies t}wo choices: on or off; or, in purely numerical terms, 1 or 0.›› People tend to think in terms of a ten-based number system }because they have ten fingers - but a switch has only two "fingers." When you RUN NP you will notice the row of switches at }the bottom of the screen - your only means of shuttling information through this simulated computer. Each switch only has tw}o positions - up for on (1), or down for off (0). A switch is therefore the perfect means for conveying binary information.›}››ÂÁÎËÉÎÇ_ÏÎ_ÍÅÍÏÒÙ:›› Every computer has a memory area, called "Random Access Memory" (RAM), and a CPU. Memory is the c}omputer's capacity to store information, and is measured in terms of "bytes." A byte generally consists of eight bits of inf }ormation - where a bit is one binary (on or off) condition.›› A CPU performs all the arithmetic that manipulates the numeri!}cally-encoded data - the ones and zeros - stored in a computer's RAM. This memory is made up of discrete "locations" in the "}machine, each of which has an "address." It helps to think of each memory location as a mailbox that not only has an address#} attached to it, but also a place to put the mail. This mail is the data stored at that location. Each "mailbox" has a limi$}ted amount of space that depends on the machine design. Because each of the NP's memory locations can only store four bits (%}one nibble), we say it is "nibble-addressable." By simply requesting a particular address, the CPU can immediately find what&} is contained at that address. This direct addressability of memory by the CPU is what gives a computer the power of random '}access.›› The CPU and RAM are connected by three buses: the address bus (8 parallel wires), the data bus (4 parallel wires)(}, and the control bus. The first provides access to each memory location; the second simply moves data to and from each loca)}tion; and the third carries signals which control the flow of data between the CPU and memory. Furthermore, the CPU is organ*}ized into a system of discrete "registers" that serve as temporary stations for storing and shuffling data.›› Look at the N+}P front panel. On the middle-left side of the screen is a "rotary switch" with various letters positioned around it. The le,}tters on the right-hand side of this switch - A and B - stand for the A and B registers in the CPU. It is between these -}two registers that the actual "arithmetic" and logic operations take place. The A register is also called the 2752Accumul.}ator2753 because this is where the answers to many of the commands end up - or accumulate.›››ÔÕÒÎÉÎÇ_ÉÔ_ÏÎ:›› First, p/}ress "P" to turn on the Power to your NP. Make sure the rotary switch is pointing to the letter "M", for Memory. You mo0}ve this switch left (counter-clockwise) with the "<" (less than) key, and right (clockwise) with the ">" (greater than) k1}ey.›› At the top of the screen, you should see an address box containing a long row of "lights" with numbers across the top2}. This is the "location counter." It displays the 8-bit address of the location currently being interrogated by the CPU. N3}otice the vertical row of buttons at the right side of the screen. These buttons represent NP's functions. Press the "B" 4}(for Begin) key on your keyboard. This effectively turns off all the lights in the address box, indicating that you have ret5}urned to the first address in memory: the 0 (zero) location. Now press the "I" key, for Increment. This moves you to the 6}next address: location 1. If you repeatedly press I, you will continue to step through successive locations.›› Notice th7}at, as you step through each location, the row of 8 lights in the address box changes. These lights display the address of t8}he "mailbox." To view the contents of this mailbox, look at the row of 4 lights directly above the toggle switches. This sh9}ows the value stored at the current location. If you were to move the rotary switch pointer to A, you would see the conten:}ts of the A register. To examine the B register, point the switch to the letter B. Now, move the pointer to the letters ;}H or L at left. These access the "high nibble" (the first or left-most 4 bits) and the "low nibble" (the last or right-mo<}st 4 bits) in the 8-bit address.›››ÅÎÔÅÒÉÎÇ_ÄÁÔÁ:›› The next step is to "fill" these locations so that the processor has =}something to process. With the rotary switch in the M position, try toggling the switches in the switch box. Nothing happ>}ens? Don't worry; turn some of these switches "up" and then press L, for Load. Now you have something. Any switch that i?}s on has a corresponding light glowing just above it.›› You have just entered your first "data" into the NP. Now move the @}rotary switch to the H position and try the same exercise. This time, when you press L, lights not only come on in the "A}contents" box, but the same pattern of lights appears in the high (left-most) nibble of the address box. Moving the rotary sB}witch to L (for Low nibble) and loading a value affects the low nibble (right-most) half of the 8-bit address in the same wC}ay. Once you have thus designated a full 8-bit address, move the pointer to the M position again to view the contents of tD}hat same address. By doing this, you have, in effect, moved to this address location, and can enter data there.›› If you nE}ext move the rotary switch pointer to the A or B position and try to enter data, you will not be able to - because whatevF}er goes in or out of these registers has to do so while the NP is running instructions encoded into memory. You will also noG}tice a small Output light (labeled "Out") at the upper left of the screen. We will explain the use of this in the NANOASSEMBH}LER (NA) portion.›› Your next job is to enter your first machine-language program on the NP.›››ÐÒÏÇÒÁÍÍÉÎÇ_ÔÈÅ_ÍÁÃÈÉÎÅ:››I} A CPU executes commands sequentially. As it runs a program, it steps through this sequence in much the same way you "incrJ}emented" through each memory location. However, the program may instruct the CPU to take other paths - "branching" to many dK}ifferent locations before completing its task. You are able to program this processor by entering three different kinds of dL}ata: 1) encoded commands; 2) pure numbers; and 3) addresses. As with any program, it is the logic of this sequence that detM}ermines what the processor will do.›› NP understands 16 different commands - its "instruction set." Although initially expN}ressed in one nibble, some commands require additional memory locations to hold the data necessary to execute the command. TO}he following table lists these 16 commands, showing each corresponding binary code; how many nibbles in a program the instrucP}tion requires; its "mnemonic"; which (if any) flags in the status register the instruction affects; and a brief explanation oQ}f the command function. ››=====================================================================››Figure 1 - INSTRUCTIONS SETR}››Dec. Binary Nibbles Mnemonic Flags* Function› per affected› Instr. S} C Z›› 0 %0000 1 ADD Y Y Add the contents of B › registT}er to the contents of› A register - results in A.› 1 %0001 2 LDA # U} N Y Load A with number› following instruction.› 2 %0010 3 LDA addr V} N Y Load A with number at› location specified by addr.› 3 %0011 3 SW}TA addr N N Store the contents of A at› location specified by addr.› 4 %010X}0 1 TAB N N Transfer contents of › A to B.› 5 %0101 1 Y} TBA N Y Transfer contents of› B to A.› 6 %0110 1 RRC Z} Y Y Rotate A right one bit› through carry.› 7 %0111 1 RLC Y[} Y Rotate A left one bit› through carry.› 8 %1000 1 AND Y Y \} Logically AND A and B -› result in A.› 9 %1001 1 OR Y Y Lo]}gically OR A and B -› result in A.›10 %1010 1 XOR Y Y Logical^}ly XOR A and B -› result in A.›11 %1011 3 BZ addr N N Branch to a_}ddr if Zero flag› is set.›12 %1100 3 BNZ addr N N Branch to addres`}s if Zero› flag is not set.›13 %1101 3 BCS addr N N Branch to addra} if Carry› flag is set.›14 %1110 3 BCC addr N N Branch to addr if b}Carry› flag is not set.›15 %1111 3 JMP addr N N Branch to addr › c} unconditionally.››2752* Flags affected refers to whether or not the instruction had}s any effect on the flags in the status register. The C column stands for the Carry flag (did the operation result in a carre}y being generated?), and the Z stands for the Zero flag (did the operation result in a zero?). A Y appears in the column if f}the flag is affected by the instruction. An N indicates the flag is not changed by the instruction.2753.››================g}=====================================================››D:BINPROG2.TXT›CS,D:GRAPH3D.RV1,0›.G.U.P.,D:GUP.OBJ,0›/G.U.P.G FK „                   i}                          j}        As you develop more complicated programs, you will have to understand and use more ofk} these commands. But for now, try a very short routine - one that simply adds two small numbers together.›››ÒÏÕÎÄÁÂÏÕÔ_ÁÄÄÉl}ÔÉÏÎ:›› Sample program 1 will add the numbers 7 and 3, and the answer will end up in the Accumulator. If you haven't alrem}ady, turn on the power by pressing P. Now, press B for Begin, and confirm that the rotary is pointing at M (Memory). n}Now key in this program with the following procedure:›› 1. Toggle the switches to the on and off positions corresponding to}o the bits of the number identified as Code in the program - up (or on) for 1, and down (or off) for 0. Notice that each binp}ary code is preceded by a % sign to make it easy to distinguish binary numbers from decimal quantities.›› 2. Check that thq}e address indicated by the location counter is the correct one for that Code, and then press L for Load.›› 3. Press I r}for Increment. This will take you to the next address.›› 4. Repeat steps 1 through 3, loading the currect nibble into eacs}h address, and move on to the next set until you've loaded all the nibbles in the proper order.›› 5. Once you have complett}ed loading the program, press B again to return to address 0. Then step through each memory location with the I key to bu}e certain the program is entered properly.›› 6. Now press B for Begin once more, then R for Run. Note that you may Hav}lt the program at any time by pressing H, and continue by pressing R.››==================================================w}===================››SAMPLE PROGRAM 1››Addr Code Mnemonic Remark›› 0 %0001 LDA #3 ;Get first number.› 1 %0011x}› 2 %0100 TAB ;Move to B.› 3 %0001 LDA #7 ;Get second number.› 4 %0111› 5 %0000 ADD ;Figure sumy}.› 6 %1111 JMP 6 ;Jump to stop.› 7 %0110› 8 %0000››============================================================z}=========›› Let's go over Sample Program 1 step-by-step to see exactly what it does when Loaded and Run. First it uses the{} "LoaD Accumulator immediate" instruction (abbreviated LDA #) to load the number stored at the address immediately following |}the instruction code (address 1) into the Accumulator. This number (in this case, a %0011 or decimal 3) is one of the two to}} be added. At address 2 is an instruction to Transfer the number from the Accumulator into register B (TAB). Address 3 cont~}ains another LDA # instruction to Load a %0111 (7 decimal) from address 4 into register A. The instruction at address 5 actu}ally ADDs the number in register B to the number in A, and places the answer in A. Address 6 contains a JuMP instruction (JM€}P addr) that tells the machine to jump to the address specified at the next two memory locations - 7 and 8. All addresses ar}e two nibbles, and the NP follows a procedure standard to many microprocessors where the low nibble of the address is the nex‚}t location (7 in this case) and the high nibble in the following one (8). We call this a "jump self" because we specify addrƒ}ess 6 (%00000110) as the place to jump to.›› When you Run this program, the "busy light" remains on and both rows of lights „}flash different patterns as the CPU steps through the program. The NP has been made to Run slowly so that you can track each…} instruction as it is executing. When the program "hangs up" at location 6, press H (for Halt) to make the busy light go o†}ff. Now turn the rotary switch to point at A. Here you find the answer to the addition problem: %1010, or 10 decimal. Keep‡} the pointer in this position and Run the program again, after pressing Begin. Watch the A register change values - first 3 ˆ}(%0011), then 7 (%0111), then the answer, 10 (%1010).›››ÍÏÖÉÎÇ_ÏÎ:›› In Sample Program 1, the machine added two numbers a‰}nd got an answer that it could express in one 4-bit nibble. But, what if this answer had been larger than one 4-bit nibble -Š} say, a number like 23 (%00010111)? Fifteen (%1111) is the largest number that one nibble can express. When a processor add‹}s two numbers together whose answer is bigger than its registers can hold, the answer "overflows" the register. When this haŒ}ppens in NP, a "carry flag" is set to 1 in a special Status Register of the CPU (This register is not directly accessible to }the user). The program has to contain commands that recognize the condition of this flag (either 1 when an overflow has occuŽ}rred, or 0 when there is no overflow) and take appropriate action. You can determine which instructions cause changes in the} carry flag by studying the C column (under "Flags affected" of Figure 1. If there is a Y in the C column, the instruction w}ill affect the carry flag - i.e., set it to 1 if an overflow occurs, or reset it to 0 if no overflow occurs.›› Sample Progr‘}am 2 adds the numbers 11 (%1011) and 12 (%1100) to arrive at 23 (%00010111). Not only does the program have to check the car’}ry flag, but because the answer doesn't fit in one register, it has to place the answer someplace else. The solution is to d“}esignate certain memory locations as data areas - two for input and two for output. Program 2 fetches the two numbers to be ”}added from memory locations 240 (%11110000) and 241 (%11110001). These addresses are input areas. This means that before yo•}u Run the program, you must manually Load the numbers to be added at these locations - place 11 at address 240, and 12 at add–}ress 241.›› Similarly, the output area is at locations 248 (%11111000) and 249 (%11111001). The low nibble of the answer (—}%0111 in our example) appears at 248, and the high nibble (%0001) at address 249.›› This program also handles the overflow ˜}condition described above. If the answer does overflow a nibble, the program places a 1 in the accumulator and stores it as ™}the answer's high nibble. If, however, the answer is less than 15 (and fits into one nibble), the program branches to anotheš}r address, where it loads a 0 into A and stores that instead. This introduces one of 4 "conditional jump commands," which wi›}ll be explored in the discussion on the NanoAssembler.››=====================================================================œ}››Sample Program 2››Addr Code Mnemonic Remark›› 0 %0010 LDA 240 ;Get first number.› 1 %0000› 2 %1111› 3 }%0100 TAB ;Move to B.› 4 %0010 LDA 241 ;Get second number.› 5 %0001› 6 %1111› 7 %0000 ADD ;Figurž}e sum.› 8 %0011 STA 248 ;Put low nibble in memory.› 9 %1000›10 %1111›11 %1110 BCC 19 ;Only one nibble answŸ}er.›12 %0011›13 %0001›14 %0001 LDA #1›15 %0001›16 %1111 JMP 21 ;All done.›17 %0101›18 %0001›19 % }0001 LDA #0 ;Zero A.›20 %0000›21 %0011 STA 249 ;Put high nibble in memory.›22 %1001›23 %1111›24 %1111 ¡}JMP 24 ;Jump self to terminate.›25 %1000›26 %0001››=================================================================¢}====›› Program 3 is a "mystery program" that actually accesses the "sound chip" that we've built into NP. The best way to £}learn the details of operating the NP is to use it and experiment by creating your own machine language programs.››==========€}===========================================================››Sample Program 3››Addr Code Mnemonic›› 0 %0001 LD¥}A #2› 1 %0010› 2 %0100 TAB› 3 %1000 AND› 4 %0110 RRC› 5 %0011 STA 254› 6 %1110› 7 Š}%1111› 8 %0000 ADD› 9 %0011 STA 254›10 %1110›11 %1111›12 %0000 ADD›13 %0011 STA 254›14 §} %1110›15 %1111›16 %0001 LDA #6›17 %0110›18 %0011 STA 254›19 %1110›20 %1111›21 %00š}00 ADD›22 %0011 STA 254›23 %1110›24 %1111›25 %0000 ADD›26 %0011 STA 254›27 %1110›28 ©} %1111›29 %0000 ADD›30 %0011 STA 254›31 %1110›32 %1111›33 %0001 LDA #13›34 %1101›35 ª} %0011 STA 254›36 %1110›37 %1111›38 %1111 JMP 38›39 %0110›40 %0010››============================«}=========================================›››ÓÁÖÉÎÇ_ÁÎÄ_ÌÏÁÄÉÎÇ:›› With NP, you can Save and Load the entire 256 memory lo¬}cations (%00000000 through %11111111) to disk and/or tape. Use the Save command (OPTION) and type in a filename in response ­}to the prompt. To Load, use the Load command (SELECT) and type in the name of the file you wish to load.›››The NanoAssembl®}er›› To alleviate the difficulties involved in working with machine language, early computer users created programs calle¯}d "assemblers." An assembler is a human-to-machine translator. It operates from a "dictionary" of mnemonics (a combination °}of letters that humans can understand), translating these mnemonics into the numbers of machine code. Using assemblers, you ±}can write a program with the more easily remembered mnemonics, and let the computer create the actual machine language (the o²}nes and zeros).›› The NanoAssembler (NA) will teach you how to use assemblers. With the NA, you will be able to write long³}, complicated programs for the NP much more easily than you would using machine language.›››ÓÏÕÒÃÅ_ÃÏÄÅ_ÔÏ_ÏÂÊÅÃÔ_ÃÏÄÅ:›› Ž} You may find that many people refer to "assembly-language programs" and "machine-language programs" interchangeably, as thouµ}gh they were the same thing. Actually, an assembly-language program is a text file - known as a "source file" - that the com¶}puter cannot execute directly. It is simply a series of text lines comprising mnemonics, numbers, and labels. Before the co·}mputer can run such a program, the source file must be "assembled" or translated into a machine-language file - also known asž} an "object file."›› Take a look at Sample Program 4, below, which you can load and run on the NanoProcessor. You may reco¹}gnize this program, as it is identical to Sample Program 1. The two left-most columns, entitled "Addr" and "Code," contain tº}he machine language (object code), which makes up the program. You can enter this object code bit by bit, or you can enter t»}he more easily read and understood assembly language (source code) contained in the Line, Label, Mnemonic, and Remark columnsŒ}. The Remark column is like a REM statement in BASIC. It makes the program much easier to read and understand.››===========œ}==========================================================››Sample Program 4››Addr Code Line Label Mnemonic Remark›› Ÿ} 001 LDA# 3 ;Get first number.› 0 %0001 › 1 %0011 › 002 TAB ;Move to ¿}B.› 2 %0100 › 003 LDA# 7 ;Get second number.› 3 %0001 › 4 %0111› 004 ADD À} ;Figure sum.› 5 %0000› 005 HERE JMP HERE ;Jump self to stop.› 6 %1111 › 7 %0110› 8 %0000››==Á}===================================================================›› Our NanoAssembler package consists of two BASIC progrÂ}ams: the NanoEditor (NE) and the NanoAssembler (NA). The NE is a simple text editor that lets you enter your program as sourÃ}ce code and save it to disk or tape. NA can then read and translate that file into a corresponding file of object code, whicÄ}h you can save to disk or tape. You can then load the object code into the NP and run it.›››ÃÒÅÁÔÉÎÇ_Á_ÐÒÏÇÒÁÍ:›› We wilÅ}l use Sample Program 4, above, to demonstrate how the NE and the NA work. To start, Load and RUN the NanoEditor. You begin Æ}with this menu:›› 1) EDIT› 2) FILES› 3) PRINT› 4) EXIT›› Choose the Edit option, whÇ}ich allows you to create and modify files. The Editor now displays the command prompt: CMD. You may enter one of five singlÈ}e-letter commands:›› A - Add a line of text.› E - Edit a line of text.› D - Delete a line of text.É}› I - Insert a line of text.› L - List.›› To begin creating a new file - in this case Sample Program 4 - Ê}press A. In response, the Editor displays line 001, with a flashing cursor waiting for your input. For each line of source Ë}code, the Editor provides a line number ranging from 001 to 200. When you enter the Add-a-line mode, the program always dispÌ}lays the cursor on a new line of source code - one line past the last line in memory. You can automatically advance to the nÍ}ext line by pressing [ENTER] or [RETURN]. To exit the Add-a-line mode, press the [ESCAPE] key.››D:BINPROG3.TXT›q Now enter the contents of the Label, Mnemonic, and Remark columns. Because our Editor is in BASIC, your text input will bÏ}e slower than with a full-blown word processor. The Label column is empty in line 001 of our sample program, so press the [TÐ}AB] key to move into the Mnemonic field. Now type in the first instruction: LDA# 3. You must enter the text 2752exactlÑ}y2753 as it appears in the listing, or the NA program will not interpret the code properly. Make sure there is no space bÒ}etween LDA and the #. You must, however, place a space between the # and the 3.›› This spacing is critical because the mneÓ}monic field actually consists of two sub-fields; and the space acts as a separator for these sub-fields. The left sub-field Ô}is the "op-code," or instruction field, which defines the actual instruction. In line 001, the op-code is LDA#. The right fÕ}ield contains the "operand." The operand is either a two-nibble address or a single-nibble quantity to be loaded or stored iÖ}n a register or memory location. It defines the number that the op-code is to operate on. In line 001, the number 3 (%0011)×} is the operand.›› After you have entered the first instruction, you may tab into the Remark field. On a program as short Ø}as this one, however, you may choose to save time by omitting the remarks. Continue entering lines 002, 003, and 004 in a siÙ}milar fashion.›› Once you've entered part or all of the program into memory using the Add command, you can use the other edÚ}iting commands. Each of these commands prompts you for a particular line number. E lets you Edit an already-existing lineÛ} in memory. D allows you to Delete a line, and I lets you Insert a line. The L command lets you List up to 10 lines oÜ}f a program to inspect what is in memory. If the program extends more than 10 lines beyond the beginning line number that yoÝ}u specify, you have the option to either continue listing more lines or quit and return to the command line.›››ÌÁÂÅÌÓ_ÁÓ_ÌÁÂÞ}ÏÒ_ÓÁÖÅÒÓ:›› In line 005 (HERE JMP HERE), you encounter an important assembly-language tool - the "label." In the NA, we ß}define a label as a group of up to six alpha-numeric characters, beginning with a letter - in our example, the word HERE. Asà}sembler programs use labels in place of numeric quantities. In this case, HERE represents the address to be JuMPed to. One á}major advantage of labels is that you do not have to know the actual numeric addresses used in a program. Instead, the assemâ}bler uses the labels to assign the correct address to a particular instruction for you.›› Before continuing, let's clear upã} an area that sometimes confuses a beginner at assembly language: the difference between line numbers of a source file and adä}dresses of an object file. Each line in a source file contains only one op-code. But when you assemble the source file intoå} object code, the op-code may require as many as three addresses (See Figure 1 for the number of nibbles each instruction reqæ}uires). Thus, a source file's line numbers and the actual addresses of the object code almost always differ. When the Assemç}bler prints out its listing, the addresses and codes are located on the line just below the source code, representing the ordè}er of events during assembly.›› By inspecting the two left-hand columns of Sample Program 4, you can see that the address té}o be JuMPed to is 6. You know this only because we have already assembled (or translated) the source code on the right into ê}the object code on the left. If we hadn't provided the machine code, however, you would have to assemble all of the instructë}ions to discover what address you wanted to JuMP to. The use of labels saves you from this tedious task and is one of the prì}imary advantages of assemblers.›› When you finish entering line 005 and press RETURN, a prompt tells you to enter line 6. Tí}his program has no line 006, so press the [ESCAPE] key and the program returns you to the command line. Now you can use the î}List command to see if you have entered everything correctly. If you find any errors, you can Edit the line or lines that thï}ey occur in. If you change a line, then decide that you don't want those changes, you can press the [ESCAPE] key instead of ð}[RETURN] to revert back to the original version of the line. This option is also available if you select Insert, but change ñ}your mind before finally entering the line.›››ÆÒÏÍ_ÅÄÉÔÏÒ_ÔÏ_ÁÓÓÅÍÂÌÅÒ:›› After you are sure that you've correctly enteredò} the program, save it to disk or tape. To save your file, select option (2) Files. Then select the appropriate menu optionsó}, and enter the filename. The program will automatically append a .S extender, for Source, so that you can use the same nameô} for both source and object files without any confusion. If you have a printer, you may also wish to get a hardcopy of your õ}program. This is helpful when you are tracking down errors during assembly. To use the Print option, just select it from thö}e main menu (3). After you save (and print) the source file, select the Exit option from the main menu. The program gives y÷}ou a chance to change your mind before ending, so you don't need to worry about losing the program in memory due to an erroneø}ous keypress.›› Now it is time to Load and RUN the NanoAssembler. The program prompts you to load your source file for assù}embly. As the program translates your source code into machine code, it lists the source file, the addresses, and object codú}e to either the screen or a printer (if you have one).›››ÐÁÓÓÉÎÇ_ÔÈÒÏÕÇÈ:›› The actual assembly of the program occurs in û}two steps, or "passes." Thus, the NA is a "two-pass" assembler. The first pass does most of the work, determining the correü}ct machine-language instructions and the instruction addresses. However, sorting out labels requires a second pass because, ý}until it identifies all address labels, the program may not know the exact address of each instruction.›› Try assembling Saþ}mple Program 4. If you have entered it correctly, the NA should output the assembled version to the screen or printer. If yÿ}ou have made an error in entering the program into the NE, the NA informs you of the line number in the source code that con }tains the error, and states the type of error. For example, if in line 1 you entered LDA #3 instead of LDA# 3, when you try }to assemble the program the computer displays the error: ILLEGAL USE OF LABEL IN LINE 1. Here, the computer interprets the c }ode as a LoaD A addr instruction (object code = 2), instead of a LoaD A immediate instruction (object code = 1). Then, when }the computer evaluates the "label" #3, it finds that the label is illegal because it does not begin with a letter.›› After }displaying the program, NA prompts you to save the object file. The saved file is identical to the ones you loaded and saved } with the NP; that is, the file contains the contents of all addresses from 0 through 255. To see that your program works pr }operly, load and RUN the NanoProcessor. You can then load and run the program you've just created according to the instructi }ons detailed in the NanoProcessor portion of this article.›› For a short program such as Sample Program 4, this process may } seem a bit time consuming. For longer and more complex programs, however, the ease of writing and debugging provided by an }assembler more than makes up for the added steps.›››ÁÓÓÅÍÂÌÅÒ_ÄÉÒÅÃÔÉÖÅÓ:›› Figure 1 displays the 16 instructions that we } detailed in the NanoProcessor. You may specify any of these instructions when writing an assembly-language program with the } NanoEditor. The NanoAssembler, in turn, converts these instructions into their machine codes. There are three additional c }ommands, known as assembler directives, that the Assembler understands:›› ORG - Start object code here.› DN } - Define a nibble.› EQU - Define a label.›› The ORG command directs the NA to assemble the program at a specifie }d address between 0 and 255. For an example of this instruction, see line 1 of Sample Program 5. This program is a slightly } modified version of Sample Program 2 that we presented earlier. It performs a two nibble addition of numbers located at add }resses 240 and 241, placing the answer in addresses 248 and 249. The ORG statement makes the starting address %1010.›› The } DN instruction allows you to include a particular value at any address. Just specify the address using the ORG directive, a }nd then define the value to be placed at that address with the DN directive. Lines 22 through 24 of Sample Program 5 define }the two nibbles that the program adds.›› The EQU command lets you identify any address with a particular label. Lines 2 th }rough 6 of Sample Program 5 use this directive. These statements make the program more readable by assigning descriptive lab }els to the 5 data addresses: NIB1 and NIB2 for the two numbers to be added; LONIB and HINIB for the low and high nibbles of t }he answer; and OUT for the OUT light.›› The other change to Program 2 is in the use of the OUT light located at the upper-l }eft of the NanoProcessor screen. When you assemble Sample Program 5 and run it, you will find that the OUT light is off whe }n the program begins, but it turns on when the program is complete. Thus, you do not need to know what address the program w }ill end on. Instead, the OUT light signals that the program is finished.››================================================== }===================››Sample Program 5››Addr Code Line Label Mnemonic Remark›› 001 ORG 10› } 002 NIB1 EQU $F0› 003 NIB2 EQU $F1› 004 LONIB EQU $F8› 005 HINIB EQ }U $F9› 006 OUT EQU $FD› 007 LDA# 0 ;Turn OUT light off.› 10 %0001 › 11 %0000› } 008 STA OUT› 12 %0011› 13 %1101› 14 %1111› 009 LDA NIB1 ;Get first number. }› 15 %0010› 16 %0000› 17 %1111› 010 TAB ;Move to B.› 18 %0100› 011 }LDA NIB2 ;Get second number.› 19 %0010› 20 %0001› 21 %1111› 012 ADD ;Figure sum.› 22 }%0000› 013 STA LONIB ;Low to memory.› 23 %0011› 24 %1000› 25 %1111› 014 BCC !} NIB ;One nibble answer.› 26 %1110› 27 %0010› 28 %0010› 015 LDA# 1› 29 %0001› 30 %0001› "} 016 JMP STHI ;All done.› 31 %1111› 32 %0100› 33 %0010› 017 NIB LDA# 0 ;Zero #} A.› 34 %0001› 35 %0000› 018 STHI STA HINIB ;High to memory.› 36 %0011› 37 %1001› 38 %1111› $} 019 LDA# ON ;Set OUT light.› 39 %0001› 40 %0001› 020 STA OUT› 41 %0011› 42 % %}1101› 43 %1111› 021 HERE JMP HERE ;Jump self to end.› 44 %1111› 45 %1100› 46 %0010› 022 &} ORG $F0› 023 DN $A› 024 DN $C››========================================= '}============================›› Sample Program 6 accesses the NanoProcessor's "sound chip." Any time you store a number at (}either location 254 or 255, the NP responds with a tone. With 16 different values possible at each of these locations, you c )}an make a total of 32 different tones. The sample program plays a C scale.››D:BINPROG4.TXT››F] Function  H([M] M^ FK „                   +}                          ,}        ›=====================================================================››Sample Program -}6››Addr Code Line Label Mnemonic Remark›› 001 SOUND EQU 254› 002 LDA# 2› .}0 %0001› 1 %0010› 003 TAB› 2 %0100› 004 AND› 3 %1000› 005 /} RRC› 4 %0110› 006 STA SOUND› 5 %0011› 6 %1110› 7 %1111› 007 A 0}DD› 8 %0000› 008 STA SOUND› 9 %0011›10 %1110›11 %1111› 009 ADD›12 %00 1}00› 010 STA SOUND›13 %0011›14 %1110›15 %1111› 011 LDA# 6›16 %0001›17 2}%0110› 012 STA SOUND›18 %0011›19 %1110›20 %1111› 013 ADD›21 %0000› 3} 014 STA SOUND›22 %0011›23 %1110›24 %1111› 015 ADD›25 %0000› 016 4} STA SOUND›26 %0011›27 %1110›28 %1111› 017 ADD›29 %0000› 018 5} STA SOUND›30 %0011›31 %1110›32 %1111› 019 LDA# $D›33 %0001›34 %1101› 020 6} STA SOUND›35 %1101›36 %1110›37 %1111› 021 HERE JMP HERE›38 %1111›39 %0110›40 %0010››====== 7}===============================================================›› We hope that you have found these Nano programs instructi 8}ve and enjoyable. With what you have learned, you should be able to create your own machine language routines.››ËÐLýB°ŠË†Ý qmn®÷"#OP€NNšLINE€LB€ADšA€DEV€FL€TL€OPšLABLLšT€VLU€S€OT€OU€EXT€KEÙLÆNÌÉCÁLÂLÎLFLAÇIÔØOÐEÁÖLÌPÒSQUÒPOWÒVU€NÉÁDELAÙNÎـ:}@€€@€€€€@ @ € € € €€;}€<} !€"#$%&'@d **************************›x * NANOASSEMBLER=} *›‚ * HOME COMPUTER MAGAZINE *›Œ * VOL 5, NR 6, PAGE 134 *›– **************************›È›Òn +'0>}@1 A!@<@\@@K:nAR@ÜP-@+ Ôèå Î?}áîïÁóóåíâìåò=-@@P please wait...扉€;@y,9@,‚;BR,ƒ;Au,„9AU,…;@v,†;@@} ,‡;@ ,ˆ;@v,‰9@,Š9@,‹;@,ð<<Œ;@ ,;@,Ž;@,;@,;@,ú!A} A€#A€! A` AP!!‘ @I)‘!@PA`R‘"@I6’-@56†7@<@,.B}D:>6..SH A PR A"M6†7@<@,.C: (M((PRESS PLAY ON RECORDER THEN PRESS RETURN,+@+C}@@†6T)@“”-@“+@…P6‚7”$@v<+”$@v,%@u,.…T ”@@D} A€J A0ASSEMBLE›T #A A`^! AP!‘"@'A@h!!‘ @I)‘!@PAPrE}P‘"@I6’-56†7@<@,.D:<6.F A PP A|Y6†7@<@,.C: (Y(4PRESS PLAYF}/RECORD ON RECORDER THEN PRESS RETURN†+@+@@†+”-AU'*@„8”,G}+ ”š@ A@€* ASSEMBLE *›® EXECUTING FIRST PASSž6•-6–-@—-@“Ì6˜-H} ApÖ))ˆ7@<@,4 APà–"@%A `ê996ƒ7–$@<+–$@,%@,.ˆ7@I}<@,ô^6Š8–,-@&™-@Kƒ7+–$@,%™<+–$@,%™,4 T6Š8–,-™^ A þ ™Š8–,"J}@APR%™-@Š8–,%@6@Rƒ7+–$@,%™<+–$@,%™,0 A  ™&–"@A€K}0k™-@–&@kƒ7–$@<–$@%Š8–,&@,4ƒ7™$@<™$@%Š8™,&@,A p: ™DII@:ˆL}7@<@,, @e)@:ˆ7@<@,,!@A PN>™-@Š8–,&@>6š-@:ƒ7@$–%™<@$–%™,M},X99+š!@d*š @‘,)+š!@G*š @X,A b A Pl ™v556ƒ7+–$@,%@<+–$@,%@N},.>:•,€6˜-@Š$$ˆ7@<@,0 A @” A ž•%8›,!AVAšŸŸ›APA0AO}pApAPAPAPAPAPAPAPApApApApApA€A P}A`²˜"AŒ6–-–%@Æ6•-•%8›, —Ð(EXECUTING SECOND PASSÚ6•-ä—-@Q}“î" Ap A "6œ-•%8›,ø›"@A›@A  A 6œ-  A*8›R}, @A 4##„8•%@,6@A >P™-@–Pˆ7š%@<ž,4ƒ7™$@<+™$@,%Š8™,&@,S}APH ™ A R556-@:ƒ7+™$@,%@<+™$@,%@,,\))6„8•%@,-&P:'@,$@f6„T}8•%@,-P:'@,p A zC9 Ÿ — ‚7—$@v<+—$@v,%@u,C A „99 Ÿ —U} ‚7—$@v<+—$@v,%@u,Ž1™-8›,&@& A - ŸŽ1 ™˜ 6•-œ —¢3! PRESS ANY KEY TO COV}NTINUE+ AP0Ÿ3$¬," ŸILLEGAL CODE IN LINE —, A¶-# ŸILLEGAL LABEL IN LINE —- AÀ2( ŸTW}OO MANY LABELS -- 25 MAXIMUM2 AÊ/% ŸDUPLICATE LABEL IN LINE —/ AÔ3) ŸNUMBER OUT OF RANGE IN LINE X}—3 AÞ4* ŸILLEGAL USE OF LABEL IN LINE —4 Aè1' ADDRESS OUT OF RANGE IN LINE —1 Aò A`Y} A@ü76Ž.=:•%™,6.Ž6Ž.00076Ž7@&B:,F@_}f@@P:r6Ÿ-@| AP$Î * END *›Ø + A#@âš%@@A `}@ì6„8•,-›&@ö A A "6@A  6„8•,- A( A2"6@a}A <˜"A @F556ƒ7+–$@,%@<+–$@,%@,.>:,P AZ A6„8•,-›&@b}d6@An=6„8•%@,-6@36„8•%@,-6@= Ax))6„8•%@,-&P:'@,$c}@‚6„8•%@,-P:'@,Œ A– A "6@A ª/6„8•,-›&@%6„8•%@,-d}/ AŽ AŸ"""6@*˜"@A È 6•-Ò AÜ((ˆ7š%@<š%@,0 A €æ''ˆe}7š%@<š%@,4A @ð((ˆ7š%@<š%@,4%Apú((ˆ7š%@<š%@,4$APCCˆ7š%@f}<š%@,3/*ˆ7š%@<š%@,2:A€6-6@$"* BINARY *›,9-6Œ7@<ž&+š%@,,.ˆ7g}š%@<ž,96-6”-š%@ž&@@16 -@¡-@ž&”-6 - $@1 ¡J--6-%A:Œ7”&+š%@q}ÞÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿBdBINPROG TXTBfhBINPROG2TXTB\ÎBINPROG3TXTB*BINPROG4TXTBF9NANOASM BASB9ˆNANOEDITBASBRÁNANOPROCBASBREAD ME ,<”&+š%@,,,$ T ”^++6-%A:Œ7ž&+š%@,<ž&+š%@,,,h$r * HEX *›|4 6Œ.46Œ7@<ž&+š%@,r},.ˆ7š%@<ž,†##Œ7@<@,4A €”-@ž&+š%@,š##Œ7”<”,3@)Œ7”<”,2GA €##Œ7”<s}”,3/)Œ7”<”,2:A ® A €žW ”B:¢,"@>6¢7@<@,.¢7@<@,W6¢7@<@,.0t}Âi3Œ7@<@,3@*Œ7@<@,2G_6-@$+@:Œ7@<@,,&@U,i APÌ%%6-@$A:Œ7u}@<@,,Öa3Œ7@<@,3@*Œ7@<@,2GW6-%@:Œ7@<@,,&@Ua Apà6-%Av}:Œ7@<@,,ê$ô* DECIMAL *›þ--6Œ7@<ž&+š%@,,.ˆ7š%@<ž,”-@ž&+š%@,##Œ7w}”<”,20)Œ7”<”,39A € ”&##6-A:Œ7@<ž&+š%@,,,0$:* MENU *›D } "£N1™-@£"€…x}%-€@$™* …. ™1$X777,5,Ôèå ÎáîïÁóóåíâìåò,1,,1,load source file from:›b<<8,(1) Disk (D1:),8,(2) Cassette (C:),1y},,5,your choice:›l557,5,Ôèå ÎáîïÁóóåíâìåò,1,,7,save object file to:›v<<8,(1) Disk (D1:),8,(2) Cassette (C:),1,,5,your choz}ice:›€ APŠ‘"@I)‘"@P$” A ž)@‘$š¥-@A ¥$²* INITIALIZE{} *›Œd #A 0!™-@@)"…Š›N6€7™$@<+™$@,%@,.…W68™,-Š`6‰8™,-›d ™Æ9™-AU|}&6„8™,-* ™96Œ.00000000Ðe6‚7@,. %6‚7BR,. 46‚7@,.‚E6ƒ7@,. V6ƒ7Au,. e6ƒ7}}@,.ƒÚ46ˆ7@,. %6ˆ7@v,. 46ˆ7@,.ˆä$î]]ADD,1,3,LDA#,2,4,LDA,3,3,STA,3,3,TAB,1,3,TBA,1,3,RR~}C,1,3,RLC,1,3,AND,1,3,OR,1,2,XOR,1,3›øCCBZ,3,2,BNZ,3,3,BCS,3,3,BCC,3,3,JMP,3,3,DN,1,2,EQU,0,3,ORG,0,3›* FILENAME *› M} A ` % Input filename )‡8B:‡,!@M6‡7@  46†.‡$H 6}†.‡6†7B:†,%@,.R A!@$\* ERROR *›fo6š-F:A•,46§-F:A‡,$AV%F:A†,F-@@"‚}Rš"ADe ÄÉÓˠɯϠÅÒÒÏÒo A#p!!š A`)š!AqA#zqq+š&AY,A!€A!A"A"Aƒ}" A"0A"@A"PA"`A"pA"€A"„& ÄÒÉÖÅ ÎÕÍÂÅÒ ÕÎËÎÏ×Î& A#Ž% ÔÏÏ ÍÁÎÙ ÆÉÌÅÓ ÏÐÅ„}Î% A#˜  ÄÉÓË ÆÕÌÌ A#¢) ÕÎÒÅÃÏÖÅÒÁÂÌŠɯϠÅÒÒÏÒ) A#¬& ÆÉÌÅ ÎÕÍÂÅÒ ÍÉÓÍÁÔÃÈ& A#¶  …}ÂÁÄ ÆÉÌÅ ÎÁÍÅ A#À) ÐÏÉÎÔ ÄÁÔÁ ÌÅÎÇÔÈ ÅÒÒÏÒ) A#Ê  ÆÉÌÅ ÌÏÃËÅÄ A#Ô% ÕÎËÎÏ×ΠØÉÏ ÃÏÍÍÁÎÄ% A†}#Þ  ÄÉÒÅÃÔÏÒÙ ÆÕÌÌ A#è  ÆÉÌÅ ÎÏÔ ÆÏÕÎÄ A#ò  ÐÏÉÎÔ ÉÎÖÁÌÉÄ A#ü..  ÅÒÒÏÒ ÎÕÍÂÅÒ š‡} ÏÃÃÕÒÒÅÄ ÉΠÌÉÎÅ § A` $' A!@$’"@AP A@€D:NANOASSEM.BLE,.‰b67AWk:;û™®LINE€C€A€CMD€CMDšLN€S€FL€DEV€KEY€NÍKEÙÊLÎNÌR×ESÃIÔÉTÂØÁCÈـ€€€@€€‰}€€€ Š}d **************************›n * NANOEDITOR *›x * HOME COMPUTER MAGAZINE *›‚ * VOL 5, ‹}NR 6, PAGE 136 *›Œ **************************›È) +@‚) A€Òss€;BR,;@,‚;@vŒ},ƒ;@,„9@,…;@,†;@ ,‡;@ ,ˆ;@ ,‰;@,Ü46€7@,. %6€7BR,. 46€7@},.€æ}@.@@S:9@Y@@K:s0@} Ž}A@ð. }-@. Ôèå ÎáîïÅäéôïòú #A6Š-@ Ap A !!‹ @I)‹!@R}Ap"H-@#@ >:‹,H‹&@HA A `A0A, A@6 ÅÄÉԛ@ A€ }}CMD:J A T‹"@'$ESC›^ Ah-Œ-@@->:‹,4ƒ7Œ<Œ,A€r Œ A0| >‘}:‹,>:‹,4AA †R-@@ A ' L#+46-P:,R @)!AA  A€š A’}€//ŒAPAPAA A0® A ž ÁÄěÂŽ"AAÌ6-Ž%@֏-@“}@!@à Aê A0ô"@$þ+ 6Ž-6-%@+Ž"AA0  } A”}p;. &SOURCE CODE IS A MAXIMUM OF 200 LINES!8 A0;$ ÄÅÌÅÔś&' !Ž  NO SUCH LINE$ A0'$0 DE•}LETING LINE :g ‘-Žc6€7‘$@v<+‘$@v,%@u,.€7+‘%@,$@v<++‘%@,$@v,%@u,g ‘DA6Ž-–}Ž&@A6€7+Ž%@,$@v<+Ž%@,$@v,.N$X ÅÄÉԛb. !Ž! THERE IS NO LINE …+ A0.$l—}-@@!@v< A-@< €7$@v<+$@v,%@u,€ A0Š"@$” Ž"˜} $ž6-%@š ² }Œ A Æ ÉÎÓÅÒԛÐ: !Ž-  LAST LINE IS Ž CAN'T INSERT7 A0:$ÚS™}ŽAF 2SOURCE CODE IS ALREADY AT MAXIMUM OF 200 LINES.P A0S$äp‘-Ž6@l6€7+‘%@,$@v<++‘š}%@,$@v,%@u,.€7‘$@v<+‘$@v,%@u,p ‘î6Ž-Ž%@ø#6-@ A# A0"›}@A $p‘-Ž6@l6€7‘$@v<+‘$@v,%@u,.€7+‘%@,$@v<++‘%@,$@v,%@uœ},p ‘ 6Ž-Ž&@*$4 ÌÉÓԛ>( !Ž  NO SUCH LINE % A0($H% (}%-@@!@R A}\- … f(( €7+$@v,<+$@v,%@u,p6-%@z!ŽA @„L L @ Ž A ‹"@'$˜‹"AUA@¢ A ¬1$ Ÿ} . A 1$¶ ÆÉÌÅӛÀ0 }-@0 File Device MenuÊ# #A6Š-@ }# ApÔ+ A +‹ @I)‹!@QA €Þ‹"@Q$è3‹"@P)6ˆ7@<@,.C:3 A€ò¡}6ˆ7@<@,.D:ü?-@@6‡.1 Input filename 5‡<‡4?$'B:‡,!@'6‡7@ â A ìJ-@©}Ž AF3… €7+$@v,<+$@v,%@u,J ö$ÅÎÄ ÐÒÏÇÒÁ͛ @@ 7ARE YOU SURE YOU WANT TO END THIS ª} SESSION? (Y/N) + A +‹@‰*‹@xA- >:‹,‹"@‰ +* Ap-($2ÉÎЫ}ÕÔ ÌÉÎś<06“-6-'-0 … F6”-+@@$,%@P5+-”&+P:”'@@,,$@@P:”'@@,¬}5 A Z*’-@B:,*‹"@:7’<’,,Ad ’nA6”-”%@)”!+%@,$@@A6”-+%@,$@@­}x >:‹, A`‚E%‹"A&*”!+@@$,%@36”-”&@; >:‹,E A`ŒM‹"AU!AR@$ ®}. A @ARJ A0M$–‹"@'6-@$ a%‹"@0*”!+@@$,%@36”-”&@; ¯}>:‹,S”"+$@@,%@9a >:@(,ªa%‹"@1*” @@$+%@,36”-”%@; >:‹,S”"+%@,$@@°}a >:@),ŽC-‹"@(*”&@@!+@@$,%@;6”-”&@@C >:‹,ŸC-‹"@)*”%@@ +%@,$@@±};6”-”%@@C >:‹,ÈD‹"AV-@/’-@@v6  : ’D APÒ‹"AT >:AT,ܲ}‹A'APæ)6“-“%@“!@)6“-@ð'“"@'6”-+@@$,%@ú'“"@'6”-@@³}$+%@,B)-”&P:”'@@,$@@P:”'@@,B >:@1,>:@0, A`ÐÒÉÎÔ ÍÅÎ՛"8’-@ŠŽ}"Œ‚/-Œ+’$@,%@4 ‚8 ’,$6JJ14,(1) Edit,14,(2) Files,14,(3) Print,14,(4) Exit,0,,11,your choice:›@KKµ}14,(1) Disk (D1:),14,(2) Cassette (C:),14,(3) Exit,0,,11,your choice:›J<<14,(1) Save,14,(2) Load,14,(3) Exit,0,,11,your cho¶}ice:›T)@‹$^‘-@A ‘$h #Apr-’-@@"•)67’<’,.>:•,- ’| 6ƒ7@·}<@,.ADEIL†$<<155,27,127,126,28,29,30,31,125,255,253,158,254,156,157›šb’-@@92@ž}@@= ’_2b$€8 6….=:,6†.…6….00056…7@&B:†,:–,Z ’]$Â’-@uÌ00€7+$@vº},%’<+$@v,%’,0 ApÖ ’à6-@ê$ô ÅÒÒÏқþo6”-F:A•,46—-F:A‡,$AV%F:A†,»}F-@@"R”"ADe ÄÉÓˠɯϠÅÒÒÏÒo AP!!” A`)”!AqA@qq+”&AY,A A0Œ}A@APA`ApA€AAAA A0& ÄÒÉÖÅ ÎÕÍÂÅÒ ÕÎËÎÏ×Î& AP&% œ}ÔÏÏ ÍÁÎÙ ÆÉÌÅÓ ÏÐÅÎ% AP0  ÄÉÓË ÆÕÌÌ AP:) ÕÎÒÅÃÏÖÅÒÁÂÌŠɯϠÅÒÒÏÒ) APD& ÆÉÌÅ ÎÕÍÂÅÒ ÍÉÓÍÁÔÃÈŸ}& APN  ÂÁÄ ÆÉÌÅ ÎÁÍÅ APX) ÐÏÉÎÔ ÄÁÔÁ ÌÅÎÇÔÈ ÅÒÒÏÒ) APb  ÆÉÌÅ ÌÏÃËÅÄ APl% ÕÎËÎÏ׿}ΠɯϠÃÏÍÍÁÎÄ% APv  ÄÉÒÅÃÔÏÒÙ ÆÕÌÌ AP€  ÆÉÌÅ ÎÏÔ ÆÏÕÎÄ APŠ  ÐÏÉÎÔ ÉÎÖÁÌÉÄ AP”.. À} ÅÒÒÏÒ ÎÕÍÂÅÒ ” ÏÃÃÕÒÒÅÄ ÉΠÌÉÎÅ —ž A0š' A€ A@€ D:NANOEDIT.OR6Œ-+(Œ*(š, A§d–—÷¹(Ì(FILE€IN€BL€ADDRšPC€PPC€BIN€BINšA€NTšMEM€PMEM€SW€LON€RSXšRSYšRSC€F€AREG€BREG€ÁPOWEÒRÆPÃDELAÙPMBAÓINÃRS×ÃXPOÓÂLOÃÂ}YPOÓLOÎPINÃAREÇBREÇS×KEÙCFLAÇZFLAÇPÖMÄـ€€A@DAZÀA Ä  „Ã} ˆ Œ A’A¶Úßóø@@@2B”9Ä}B“ˆ@@ @'@B—A @!@"B—D#@$@%&'()Å}*@+d*NANOPROCESSOR*›n*HOME COMPUTER MAGAZINE*›x*VOL 5, NR 5*›Ò&&ƒ9AV,„;@,…;@,Æ}܆;@h,‡9@,æˆ;@,‰9@1,ðŠ;@,‹;@,úŒ;@,;@,&&Ž9@,Ç}9@,;@,&&‘;@ ,’;@,“;@,.@.@@K:"I + 1 È}Setting up the NanoProcessor4 I PLEASE WAIT. . ., A@6 Ap@ AJ6”-@T AP^É}•"A0h6”-@r AP|–"AP†•"APAdAUšššƒ8—%@Ê},%@A#A#PA$A$pA& A&PA&€A'0A'€A(`A)0A0A00A0`Ë}A0A1 € A8 ® A APž˜-@@ ˜Â F:Ad,"AUA€Ì)@Ì}”Ö”@:H, Aà1 A!0 A! AP'  1 A€ê.”"@:P, A`$6–-. A!€ô Í} A€þ }AR@>-@> $ OUT  NanoProcessor r-@@r Î}W 128 64 32 16 8 4 2 1  |   &jj b      | Ï}| ADDR | 0q-@@ q W8 4 2 1   HÐ} M A  Begin |   |:_-@@_ EL   B    < Ñ} > IncD^-@@^ D    Busy |1 1 1 1| Run NÒ}p-@@p V|   |  |0 0 0 0|     | SwitchesXA-@%Ó}@A '| Halt Power b6-@3@!  --@2@"6 Loadl6”- AÔ}@v$€*VARIABLES*›Š AYF:AY,%@”D6™-F:Aa,&@&BBy™D6™-™$AV%@%AÕ}ž9B2w@'A#@$9B2`AUšš-@²gB2V%š@5B2H%š@2Ö}$š%@dSB2U&š@$š%@dgA%š@dŒ šÆA @ÐAAbÚAA×}’ä+š-™&A(™%A'š+ šî6….000000006‹.0000ø$*INIT 2*›  #A (š-@Ø}@ "”$6‡8š,-”( š :š-@@d@#"ˆ66†7š<š%@,.ˆ: š*š-@@4*"”6Ž8š,-”"Ù}”68š,-”!"ˆ*67š,.ˆ> šHš-@AVR6ƒ8š,-\ šf6›-@p(š-@1"”$6‰8Ú}š,-”( šz$„128,64,32,16,8,4,2,1,0›ŽUU0000,0001,0010,0011,0100,0101,0110,0111,1000,1001,1010,1011,1100,1101,1110,11Û}11›˜((5,12,-,5,11,\,6,11,|,7,11,/,7,12,-›¢EE255,243,230,217,204,193,182,173,162,153,144,136,128,121,114,108›¬66102,96,9Ü}1,85,81,76,72,68,64,60,57,53,50,47,45,42›¶ *PLOT*›À6œ-&@Ê6”-P:œ'@,Ô;;6ž-P:+P:œ'@$A,'AÝ}&”,$@,%@Þ''6Ÿ-™%+A($”,% $@%@è 6”-‡8ž,¡"6”-6”ò¢-ŸŸ%@ü¢F:¢,%Þ}” ¢$*CONVERT ADDR*›$$$6”-P:—'@,$@%@.6„.†7”<”%@,8006”-+—&@$P:—'@,,$ß}@%@B6„7@,.†7”<”%@,L6 -@6-@Vš-@@`„7š<š,4…7š<š,APjà}(6¡-„7š<š,41(6¡-@t A P~6-%@ˆ š’ 6….„œ$Š*BINARY CONVERT*›°//›Aá}A A0A@APº* 6”-—&+P:—'@,$@,* A`Ä6”-P:—'@, A`Î6”-ƒ8—%@â}, A`Ø 6”-£ A`â 6”-€ì6Š.†7”$@%@,ö6 -@6-@š-@@ Š7ã}š<š,4‹7š<š,A (6¡-Š7š<š,41(6¡-@ A P(6-%@2 š< 6‹.ŠF$P*CONVERTä} TO BINARY*›Z6Œ.†7¥$@%@,d6 -@6-@nš-@@x 6.Œ7š<š,41 6.‚ å} -  Œ6-%@– š $ª *INPUT*›Ž/F:Ad,AU%)@ž/ AŸ6"F:B2y,"@*•æ}"@, A66 A2€È6"F:B2y,"@*•"@, A66 A4Ò$Ü #A€æŠ-@”ð"ˆç}ž"@:ˆ,APú Š AooŠAAAAAA A`A20A @A €è}A!PA" A!0)Š! A# AP)  "$,1,2,3,4,<,>,P,E,B,I,R,L,H›6*ROTARY SWITCH*›@é}›"@ AJ6”-6@ A@T›"@ A^6”-@h-Ž8›,8›,  r 6›-›%”|ê}-Ž8›,8›, 7›<›,†•" A Aš6Š-€$®*BIT SWITCHES*›ž6ˆ.†7¥$@%@ë},Â''ŠA@A`A€AÌ06”-6@)ˆ7@<@,4006”-6”Ö Aà06”-6@)ˆ7@ì}<@,4006”-6”ê Aô06”-6@)ˆ7@<@,4006”-6”þ A06”-6@)ˆ7@í}<@,4006”-6”6Š-6¥-¥%” A`&•"$0› @ A:$D*TURN ON POWEî}R*›N-@@X•"A0b/6—- AP%6”-/ A`l6•-  v@š-™%ï}@™%@'š+ š@6ƒ8AT,-€ AŠ6•-@”Š"ApžB6—-P:H:,$ð}AR,B6ƒ8—%@,-P:H:,$@,š76£-P:H:,$@,76€-P:H:,$@,² AP AŒñ} Æš-™&@T™&@RК•$@2Ú šä6Š-î$ø*ZERO PC*›-@3@   ò}6—--@3@ $ *INCREMENT PC*›*-@3@ 46—-—%@>—"AV6—-ó}H-@3@$R*CLR RUN FLAG*›\6–- A!pf*SET RUN FLAG*›p6–-@z%-@3@ô}&–$@% „š-™&@f™&@dŽš–$@2˜ š¢"-@3@&–$@"$¬LOAD FROM SWITCH›õ}¶-@3@! À//›A"PA"`A"pA"pA"pÊ(6—-P:—'@,$@%¥( A#Ô<26—-¥$@ö}%@$+—'@&P:—'@,,< A#Þ6ƒ8—%@,-¥è— ASA#ò''—&ARA%`A%A÷}&ü-@3@!$ *ADD*› 6£-£%€ 56§-£!@'6§-@56£-£&@$ $. *LOAD AREø}G*›8 A8 B 6£-ƒ8—%@,L '6š-£"'6š-@V $` *LOAD FROM LOCATION*›j A8 t 6ù}”-ƒ8—%@,~ A8 ˆ 6”-ƒ8—%@,$@%”’ 6£-ƒ8”%@,œ A#€Š *STORE AREG*›° A8 º ú}6”-ƒ8—%@,Ä A8 Î 6”-ƒ8—%@,$@%”Ø 6ƒ8”%@,-£â ” ASA%Pì ''”&ARA%`û}A%A&ö $ .ƒ8AT,!$6©-@. A%€ 6©- (š-™%@™%@!š©% š($ü} 5+2‰8ƒ8AU,,@@5 A&( 332‰8ƒ8AV,%@,@@2 @˜-@@Pý} ˜=2@$< *TAB*›F 6€-£P $Z *TBA*›d 6£-€n $x *ROTATE RIGHT*›‚ '6”-þ}§"@'6”-@Œ 46§-(P:£'@,£'@46§-@– 6£-P:£'@,%”  $ª *ROTATE LEFTÿ}*›Ž '6”-§"@'6”-@Ÿ 56§-£!@'6§-@56£-£&@È 6£-£$@%”Ò $Ü *}AREG AND BREG*›æ A1ð 6£-ú š-@@ .’7š<š,41*“7š<š,41.6£-£%‡8š%@,  š 36š}-6§-'£"36š-@" $, *AREG OR BREG*›6 A1@ 6£-J š-@@T .}’7š<š,41)“7š<š,41.6£-£%‡8š%@,^  šh A(@r AREG XOR BREG›| A1† 6£- š-@}@š &’7š<š,0“7š<š,&6£-£%‡8š%@,€  š® A(@ž BRANCH IF ZERO›Â š"@ A1 Ì 6—-—%@}$Ö *BRANCH*›à š" A1 ê 6—-—%@$ô BRANCH IF CARRY›þ §"@ A1  6—-—%@}$ BRANCH IF NOT CARRY› §" A1 & 6—-—%@$0 *NEW ADDRESS*›: A8 D 6”-ƒ8—%@},N A8 X &&6—-ƒ8—%@,$@%”&@b (—!AU6—-AU'( Apl $v SET UP AREG$,BREG$›€} 6’.†7£$@%@,Š 6“.†7€$@%@,” $ž *END*›š 6Š-² •"@$Œ A6Æ Ð} *SAVE*›Ú  +6ª-ä   SAVE TOî A7@ø s”"@:C,3  CUE TAPE AND PRESS I(THE }N PRESS RETURNi@@C:s A3P ”@:D,A2 I + ( SAVE FILE: D1:,‘I }@@‘ š-@AV *@ƒ8š,*  š4 @> A6PH $R *LOAD*›\   }+6ª-@f    LOAD FROMp A7@z l”"@:C,, CUE TAPE AND PRESS B(THEN PRESS RETURNb@ }@C:l A4€„ ”@:D,A4 Ž I + ( LOAD FILE: D1:,‘I@@ }‘˜ š-@AV¢ )@”6ƒ8š,-”¬  š¶ @À A6PÊ $Ô *ERROR*›Þ A6è }   I/O ERROR F:A•,ò 1 $ PRESS ANY KEY TO CONTINUE1)@”ü @ª"A2 A4 } *CLOSE*›$B2w. +8$B *OPEN*›L +V A@` AjB2w@}t'6•-@&•6Š-' A`~ A`ˆ B'h’$œ *IO*›Š A5@°-@@ Äisk}º"-@@" ÃassetteÄ-@@ ÅxitÎ)@”Ø”"@:E,' A6Pâ$ì*INCRE}MENT*›ö6—-—%@—!AU6—-—&AV $€ D:NPROC.BASK„%A9AUŸg†-@@MThe documentation files on this disk›were written with AtariWriter+›printer command codes for expanded›print, underlining, bo}ld, and›italics. Margins are set at 5 and›75. If you do not have AtariWriter+›to print these documentation files,›you will }have to remove the special›codes. These documentation files›are set up for automatic "chain›printing" - i.e., BINPROG.TXT wi}ll›automatically load and print›BINPROG2.TXT, and so forth until all›four text files have been printed.›Chain printing comman}ds are at the›end of each program and do not need›to be modified if you are using›AtariWriter Plus.››ER BUTTON ADVANCES THE›e "SLIDES" AND THE KNOB CON-›TROLS THE NOTE PLAYED FOR›THE SOUND SLIDES. SCRIPT›BY STEVE WRIGHT.› +6€-@F}6-@!6‚-€+ A 6ƒ-S:„,*T:„, (ƒ*… @p 6…-ƒ( @F 6‚-‚%€K‚!@! @F}P¯¯‚AAAAAAAAA AAAAA(AF}8APA`AAAAU$ZGG‚&@!AAAAA A!A"F}_$dªªªªªªªªªªªªªª›n +@x'-@@'  PRESENTING‚ -@@ THEÇ$ÈF}ªªªªªªªªªªªªªª›Ò +@Ü"-@@" ATARIæ"-@@" VIDEOð&-@@&  F}SLIDESHOW+$,ªªªªªªªªªªªªªª›6( ( ((@++(#A FASCINATING WAY TO PRESENT INFOR-B((( MATION THAT ENGAGES THE F}AUDIENCED))(!AND SHOWS OFF THE CAPABILITIES OFF(THE ATARI COMPUTERS.J ( ( ($ªªªªªªªªªªªªªª›š))(!ITF } ALLOWS THE SPEAKER TO PACE THE€##(PRESENTATION WITH HIS TALK.® ( ( (ó$ôªªªªªªªªªªªªªª›þ( LIKE THIS!F!} ( ( (W$Xªªªªªªªªªªªªªª›b((( we can demonstrate lower case...l ( ( (»$Œªªªªªªªªªªªªªª›Æ((( OR OF"}UR GRAPHICS CHARACTER SET...Ð ( ( (Ú''(              ä ( (î!!( {       `ø F#}( ($ ªªªªªªªªªªªªªª›*..(&MAYBE ÉÎÖÅÒÓÅ ÖÉÄÅÏ DOES IT FOR YOU...4 ( ( (ƒ$„ªªªªªªªªªªªªªª›Ž+„˜F$}!( ( (((((((!(¢**("ATARI HAS 3 TEXT MODES - THIS ONE,¬((OF COURSE,.......¶ ( ( (ç$èªF%}ªªªªªªªªªªªª›ò +@ü*-@@*  THIS ONE.....K$Lªªªªªªªªªªªªª›V +@` -@ @F&} ANDj&-@@&  THIS ONE!¯$°ªªªªªªªªªªªªª›º +@Ä 0„„„Î&-@@&(F'} PLOTTING!Ó†-€@؇-„@â0„@‡ö ‡û † 0„„„$ªªªªªªªªªªªªª› +@#F(}#0€@„(€*',@p@'/@@,9/@@0'/@p@09/@p@.F)}$0 @2',@€@0'/@@@P3€4',@0@P'/@P@P69/@P@`'/F*}@0@`9/@0@P8$: @<',@€@0'/A @P=€>',A@P'/A0F+}@P@9/A0@`'/A@`9/A@PD$F @H',@P@U'/A@UF,}J$P†-€@R‡-„@T0€@‡U!!2„@ @@&‡V ‡X †w$xªªªªªªªªF-}ªªªªª›‚ +@Œ.-@@.(HOW ABOUT THIS...Û$ܪªªªªªªªªªªªª›à +@â0@„„ä0F.}€@@ë€ð†-@A@@ú#,@ †#/@$†A@ ††-„@0@F/}†„"ˆ-€@ ˆ, †.†-€@0‡-@@20€„@&‡3ˆ-€@ ˆ4 ‡6F0} †;0€„@?$@ªªªªªªªªªªªªª›J +@O 0„„„T#-@@#(SOUND!Yˆ-€@P ˆF1}^‡-„@c2„@@%‡@‡h 0„„‡mˆ-€@ ˆr ‡|†-@„6€†2„@ „†‹F2}ˆ-€@ ˆ †£$€ªªªªªªªªªªªªª›® +@ž(-€@((YOU HAVE A CHOICEÂ%-@%(F3}OF 8 DIFFERENTÌ-@('VOICES'Öˆ-€A ˆà(-€@((HIT IT MAESTRO...$ªª ÖÏÉF4}ÃÅ ° ªª› 6‰-@ A   6‰-„ A   6‰- A ˆ-€@P ˆ 6Š-Q:„,2„Š‰@&F5}(S:„,)(T:„,A0 Ab 2„„„„k$lªªªªªªªªªªªªª›v +@€" -€"(YOU CAN EVEN HAVE‚+F6}-@@+(UP TO 4 VOICES„(-€@((AT THE SAME TIME!Šˆ-€A ˆŒ2„AP@F7}Žˆ-€A ˆ2€@@@@”ˆ-€A ˆ–2@@@˜ˆ-€A ˆF8}š%%2@A@@žˆ-€A ˆ †-€@ ¢%%2„AP%†@%†'@€!!2€@@F9}&†@@Š!!2@@ %†@š//2@A%@$†@@ª(S:„,)(T:„,A•F:}¬ †® ARË 2„„„„Ì 2€„„„Í2@„„„Î2@„„„Ï$Ъªªªªªªªªªªªª›Ú+„ä†-€F;}@( †î( THANK YOUø( ( ((ý,)(! ANOTHER WRIGHT-ON PRODUCTION,(†-@„6€ F<}2„@ @†ˆ-@@ ˆ  †"†-@@6€$ 0€„†& †* 6‚-„3$€ D:F=}SLIDSHOW@†ˆ-@@ ˆ  †"†-@@6€$ 0€„†& †* 6‚-„3$€ D:D DISK CONTENTS - Front Side of Disk››1. DISSOLVER CRE. Creates BASIC sub-›routines for spiral or sweep dissolves›of any graJ?}phics mode screen. Excellent!›Refer to magazine for "how to use".›(Fred Pinho, ANTIC 1/86, p18)››2. DISSOLVER DEM. A clever J@}demo of the›"Dandy Dissolver". (Fred Pinho, ANTIC,›1/86, S*P*A*C*E mods)››3. FACE. "Face of the Galaxy" - Music›with graphicJA}s. (Gary Gilbertson)››4. FADER II. An enhanced ML Hi-Res pic›loader with dot-by-dot "lapse-dissolve"›effects. To use: TransfJB}er to a picture›disk & rename AUTORUN.SYS. Compressed›pictures (ie, KoalaPad, Micro Illustr.)›must use a ".PIC" fn extender. JC}Normal›pictures (ie, Micro Painter, any 62›sector pic) use ".*IC" fn extenders.›Reboot with this pic disk to view your›"slideJD} show". Press OPTION to hold a›picture on the screen; START to skip›the pause between pics; or SELECT to go›to DOS. (PatrickJE} Dell'Era, ANTIC 5/85)››5. FADER MOD. Use to change FADER II's›pausing rate. Self prompting. BASIC.›(Patrick Dell'Era, ANTICJF} 5/85)››6. 3D GRAPHICS. A 3-D graphics editor.›(Paul Chabot, ANTIC 10/85, JC mods)››7. G.U.P. The Graphics Utility Package›JG}is a ML program which will speedup your›BASIC graphic commands & adds ten new›ones: circles, squares, patterned fills›& more!JH} Read the magazine article for›full tutorial/instructions. For best›results rename to AUTORUN.SYS & reboot›to load. If loadedJI} from this menu, you›must press RESET upon load completion.›(Darek Mihocka, ANTIC, 6/85, p45)››8. G.U.P. DMO. A demonstratioJJ}n of some›of G.U.P.'s capabilities. Load G.U.P.›(per above) prior to running this demo.›(Darek Mihocka, ANTIC, 6/85)››9. HORSJK}E. A galloping horse demo using›character graphics. (B.R.A.C.E.)››10. MILOADER. Loads/displays Micro-›Illustrator (KoalaPadJL}) pics. (ANTIC&JC)››11. MUSICIAN. A "Music construction"›program. Integral command list. Allows›editing of last note only! TJM}his version›is not compatable with the original!›(A.Giambra, ANTIC, 6/85, pg37, JC mods)››12. LAURA. Demo tune for The MusicJN}ian›above. Load "LAURA" to hear it play or›to edit. (ANTIC disk, 6/85, JC mods)››13. PENCILS. A sharp GTIA demo! (Gregg›TravJO}ares, ANTIC disk, 6/85, JC mods)››14. SLIDE SHOW. A BASIC demo using the›Atari to present computer "slides".›(Steve Wright, JP}from B.R.A.C.E. disk)››› DISK CONTENTS - Back Side of Disk››(NOTE: These programs should be loaded›w/o BASIC to insure propeJQ}r operation.)››1. FUJIBOINK. Famous Atari demo with a›bouncing multi-color "Fuji" logo.›(Park '86)››2. MCP. Multi-Colored PJR}layers demo.›Brilliant colors. ML. (ANTIC 2/86)››3. SPLASH. Splash colors on a Gr.7+›screen. ACTION. (ANTIC, 4/85)››4. SWAN.JS} Another sharp Atari demo with›flying swan & twirling Fuji. (Park '86)››5. VIEW 3D. Create 3-D wire frame pics›in Gr 8/7+. JT}Magnify, shrink, rotate, &›shift viewing position fairly fast. See›magazine article for details. ACTION.›(Paul Chabot, ANTIC JU}6/85, p37)››6. HOUSE.V3D. A sample VIEW 3D image.›(Paul Chabot, ANTIC 6/85)›rticle for details. ACTION.›(Paul Chabot, ANTIC HM