I am involved in programming computer without any operating system on top. I
practised intel assembly in qemu and try to run an assembly program on the
yeeloong laptop. I use a gnu toolchain mipsel build from embedian.

Here is the code:

>     .text
>     .globl __start
> __start:
>     li $8, 5
>     li $9, 5
>

I use a linker script as such:

> SECTIONS
> {
>   . = 0xffffffff80000000;
>   .text : { * (.text); }
> }
>

The makefile is as simple:

CROSS=mipsel-linux-gnu-
> CC=${CROSS}gcc
> OBJCOPY=${CROSS}objcopy
> LDFLAGS=-mips3 -T test.lds -Wall -nostdlib
>
> test.elf: test.s test.c
>     ${CC} $(LDFLAGS) $^ -o $@
>

Once compiled, I copy it in a tftp server directory. In the pmon's prompt, I
set an IP address then load the program from the server.

Using pmon's r command, I can't see any change in registers (t0 to t7 set to
00000000). So is my program really executed? Do I need any kind of
initialization?

-- 
You received this message because you are subscribed to the Google Groups 
"loongson-dev" group.
To post to this group, send email to loongson-dev@googlegroups.com.
To unsubscribe from this group, send email to 
loongson-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/loongson-dev?hl=en.

Reply via email to