Atari Assembler Editor - Example Code

Example Code

The following is example code for Hello World! written in Atari assembly language:

10 ; HELLO.ASM 20 ; --------- 30 ; 40 ; THIS ATARI ASSEMBLY PROGRAM 50 ; WILL PRINT THE "HELLO WORLD" 60 ; MESSAGE TO THE SCREEN 70 ; 0100 ; CIO EQUATES 0110 ; =========== 0120 *= $0340 ;START OF IOCB 0130 IOCB 0140 ; 0150 ICHID *= *+1 ;DEVICE HANDLER 0160 ICDNO *= *+1 ;DEVICE NUMBER 0170 ICCOM *= *+1 ;I/O COMMAND 0180 ICSTA *= *+1 ;I/O STATUS 0190 ICBAL *= *+1 ;LSB BUFFER ADDR 0200 ICBAH *= *+1 ;MSB BUFFER ADDR 0210 ICPTL *= *+1 ;LSB PUT ROUTINE 0220 ICPTH *= *+1 ;MSB PUT ROUTINE 0230 ICBLL *= *+1 ;LSB BUFFER LEN 0240 ICBLH *= *+1 ;MSB BUFFER LEN 0250 ICAX1 *= *+1 ;AUX BYTE 1 0260 ICAX2 *= *+1 ;AUX BYTE 1 0270 ; 0280 GETREC = 5 ;GET TEXT RECORD 0290 PUTREC = 9 ;PUT TEXT RECORD 0300 ; 0310 CIOV = $E456 ;CIO ENTRY VECTOR 0320 RUNAD = $02E0 ;RUN ADDRESS 0330 EOL = $9B ;END OF LINE 0340 ; 0350 ; SETUP FOR CIO 0360 ; ------------- 0370 *= $0600 0380 START LDX #0 ;IOCB 0 0390 LDA #PUTREC ;WANT OUTPUT 0400 STA ICCOM,X ;ISSUE CMD 0410 LDA #MSG&255 ;LOW BYTE OF MSG 0420 STA ICBAL,X ; INTO ICBAL 0430 LDA #MSG/256 ;HIGH BYTE 0440 STA ICBAH,X ; INTO ICBAH 0450 LDA #0 ;LENGTH OF MSG 0460 STA ICBLH,X ; HIGH BYTE 0470 LDA #$FF ;255 CHAR LENGTH 0480 STA ICBLL,X ; LOW BYTE 0490 ; 0500 ; CALL CIO TO PRINT 0510 ; ----------------- 0520 JSR CIOV ;CALL CIO 0530 RTS ;EXIT TO DOS 0540 ; 0550 ; OUR MESSAGE 0560 ; ----------- 0570 MSG .BYTE "HELLO WORLD!",EOL 0580 ; 0590 ; INIT RUN ADDRESS 0600 ; ---------------- 0610 *= RUNAD 0620 .WORD START 0630 .END

Read more about this topic:  Atari Assembler Editor

Famous quotes containing the word code:

    Faultless honesty is a sine qua non of business life. Not alone the honesty according to the moral code and the Bible. When I speak of honesty I refer to the small, hidden, evasive meannesses of our natures. I speak of the honesty of ourselves to ourselves.
    Alice Foote MacDougall (1867–1945)

    Many people will say to working mothers, in effect, “I don’t think you can have it all.” The phrase for “have it all” is code for “have your cake and eat it too.” What these people really mean is that achievement in the workplace has always come at a price—usually a significant personal price; conversely, women who stayed home with their children were seen as having sacrificed a great deal of their own ambition for their families.
    Anne C. Weisberg (20th century)