Blackvoxel > Programming with Blackvoxel
"Hello World" program for the Machine Language Robot
(1/1)
Karats:
; *******************************************************************
; 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
Enigma:
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
Navigation
[0] Message Index
Go to full version