Some more test code... it runs now as .PRG!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23340 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
85e661dbf0
commit
cd6103fab1
@ -41,6 +41,9 @@
|
|||||||
* http://pagesperso-orange.fr/patrice.mandin/en/howto-binutils.html
|
* http://pagesperso-orange.fr/patrice.mandin/en/howto-binutils.html
|
||||||
* http://www.wotsit.org/download.asp?f=atariexe&sc=252874182
|
* http://www.wotsit.org/download.asp?f=atariexe&sc=252874182
|
||||||
*
|
*
|
||||||
|
* generated.m68k/cross-tools/bin/m68k-unknown-haiku-gcc -nostdlib -fpic -Wa,--pcrel -c -o stage1.o src/system/boot/platform/atari_m68k/stage1.S
|
||||||
|
* generated.m68k/cross-tools/bin/m68k-unknown-haiku-ld -o stage1.prg stage1.o -T src/system/boot/platform/atari_m68k/prg.ld
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "toscalls.h"
|
#include "toscalls.h"
|
||||||
@ -70,6 +73,23 @@
|
|||||||
#define S_IFDIR 00000040000o
|
#define S_IFDIR 00000040000o
|
||||||
|
|
||||||
|
|
||||||
|
//Pterm0
|
||||||
|
//move.w #1,%d0
|
||||||
|
//trap #1
|
||||||
|
//rts
|
||||||
|
|
||||||
|
lea.l str,%a0
|
||||||
|
.loopt:
|
||||||
|
move.b (%a0)+,%d0
|
||||||
|
beq .strout
|
||||||
|
bsr putc
|
||||||
|
bra .loopt
|
||||||
|
.strout:
|
||||||
|
//Pterm0
|
||||||
|
move.w #1,%d0
|
||||||
|
trap #1
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
.loop:
|
.loop:
|
||||||
move #'.',%d0
|
move #'.',%d0
|
||||||
@ -79,10 +99,14 @@
|
|||||||
|
|
||||||
/* prints the char in d0.b to the console */
|
/* prints the char in d0.b to the console */
|
||||||
putc:
|
putc:
|
||||||
|
movem.l %a0,-(%sp)
|
||||||
move.w %d0,-(%sp)
|
move.w %d0,-(%sp)
|
||||||
move.w #DEV_CON,-(%sp) // DEV_CON
|
move.w #DEV_CON,-(%sp) // DEV_CON
|
||||||
move.w #3,-(%sp) // Bconout
|
move.w #3,-(%sp) // Bconout
|
||||||
trap #13
|
trap #13
|
||||||
add.l #6,%sp
|
add.l #6,%sp
|
||||||
|
movem.l (%sp)+,%a0
|
||||||
rts
|
rts
|
||||||
|
str:
|
||||||
|
.ascii "Haiku!"
|
||||||
|
.byte 0
|
||||||
|
Loading…
Reference in New Issue
Block a user