gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

ASM > Can't get output to VBA console

#8056 - TurboHz - Tue Jul 01, 2003 12:01 pm

I cant get the output to console feature in VBA to work in ASM.

How do you guys do that?

In VBA homepage there's this code:

@ log a message to VBA's output console or GDB console
@ r0=message to log
vbalog:
swi 0xff
bx lr

I load r0 with the adress of the text to be displayed and make the swi but nothing happens... I guess a text should appear in red such as that when you reset. Isn't it?

How should the string be terminated? with 0x13?

#8065 - torne - Tue Jul 01, 2003 3:29 pm

You have to be using the VBA debugger from the SDL version to see console output.

Torne

#8248 - tom - Sat Jul 05, 2003 10:56 am

Quote:

I load r0 with the adress of the text to be displayed and make the swi but nothing happens... I guess a text should appear in red such as that when you reset. Isn't it?


no, the logmessages don't appear on the display window, they appear in the log window. if you're using the win32 version of vba, go to the "tools" menu and select "logging...".

then click onto the main window, so that the emulator runs again. now you should see your logmessages. btw, there's also another way to output log messages, which has the advantage that it doesn't crash the real gba:

Code:

@ r2 = pointer to asciiz string
ldr r0,=0xc0ded00d
mov r1,#0
and r0,r0


(thumb code)

Quote:

How should the string be terminated? with 0x13?


no, with 0