Sha256: b8d599c0246dac00bd80f9e92e70d7edfae56ac19abd76e1e93a6172a678173e

Contents?: true

Size: 1.43 KB

Versions: 10

Compression:

Stored size: 1.43 KB

Contents

        .cr  6800
        .tf  gbye6800.obj,AP1
        .lf  gbye6800
;=====================================================;
;        Hello world! for the Motorola 6800        ;
;                 by barrym 2013-03-17                ;
;-----------------------------------------------------;
; Prints the message "Hello world!" to an ascii    ;
;   terminal (console) connected to a 1970s vintage   ;
;   SWTPC 6800 system, which is the target device for ;
;   this assembly.                                    ;
; Many thanks to:                                     ;
;   swtpc.com for hosting Michael Holley's documents! ;
;   sbprojects.com for a very nice assembler!         ;
;   swtpcemu.com for a very capable emulator!         ;
; reg x is the string pointer                         ;
; reg a holds the ascii char to be output             ;
;-----------------------------------------------------;
outeee   =   $e1d1      ;ROM: console putchar routine
        .or  $0f00
;-----------------------------------------------------;
main    ldx  #string    ;Point to the string
        bra  puts       ;  and print it
outs    jsr  outeee     ;Emit a as ascii
        inx             ;Advance the string pointer
puts    ldaa ,x         ;Load a string character
        bne  outs       ;Print it if non-null
        swi             ;  else return to the monitor
;=====================================================;
string  .as  "Hello world!",#13,#10,#0
        .en

Version data entries

10 entries across 7 versions & 1 rubygems

Version Path
zettacode-0.1.7 files.zettacode/hello_world.text/6800_assembly.txt
zettacode-0.1.6 files.zettacode/hello_world.text/6800_assembly.txt
zettacode-0.1.6 files.zettacode2/hello_world.text/6800_assembly.txt
zettacode-0.1.5 files.zettacode/hello_world.text/6800_assembly.txt
zettacode-0.1.5 files.zettacode2/hello_world.text/6800_assembly.txt
zettacode-0.1.4 files.zettacode/hello_world.text/6800_assembly.txt
zettacode-0.1.4 files.zettacode2/hello_world.text/6800_assembly.txt
zettacode-0.1.3 files.zettacode/hello_world.text/6800_assembly.txt
zettacode-0.1.2 files.zettacode/hello_world.text/6800_assembly.txt
zettacode-0.1.1 zettacode.files/hello_world.text/6800_assembly.txt