Author Topic: "Hello World" program for the Machine Language Robot  (Read 6125 times)

Karats

  • Newbie
  • *
  • Posts: 1
  • sys 64738
    • View Profile
"Hello World" program for the Machine Language Robot
« on: December 05, 2015, 11:19:19 pm »

; *******************************************************************
; Program Name : Hello World
; Purpose : To provide an example of syntax usage in a 'Hello World' setting.
; Author : Kara O'Dell                                     
; *******************************************************************

.org 0                                  ; start program at 0x00000000

start:
   move.l VIDEO_ADDRESS(r0), r1         ; move video addr pointer address to r1
   move.l #VIDEO_MEMORY, r2             ; move our video location to temp register so we can
   move.l r2, (r1)                      ; ... store it at the address in r1
   move.l VIDEO_MODE(r0), r1            ; move video mode address to r1
   move.l #1, r2                        ; move our setting value to temp register so we can
   move.l r2, (r1)                      ; ... store it at the address in r1
   brk                                  ; halt cpu

VIDEO_MODE:     .data.l (0x80000100)    ; data statement with hexadecimal operand
                                        ; ... and address of video mode setting.
VIDEO_ADDRESS:  .data.l (0x80000104)    ; address of video address pointer

VIDEO_MEMORY:                           ; this is the address we will store into VIDEO_ADDRESS
   .data.b ("Hello World!")             ; data statement with string operand
« Last Edit: December 05, 2015, 11:26:35 pm by Karats »

Enigma

  • Administrator
  • Jr. Member
  • *****
  • Posts: 68
    • View Profile
Re: "Hello World" program for the Machine Language Robot
« Reply #1 on: December 07, 2015, 12:04:11 pm »
Oh, that's nice...

Welcome to the Blackvoxel Forum, Karats  :)

We see you managed to understand how the Assembly robot is working without example.

Guess you already have some good knowledge about hardware to have made this...

Yes, examples about programming assembly robot are missing. We'll publish some examples to help understanding.

We'll give you also some though on your program to help improve it.

The Blackvoxel Team