Or: EQU is the equivalent of #DEFINE in C. (well... a bit)
By the way,
Can I use C and Assembly in MSX together?
You can but beleive me you don't want to
And why not? I've been doing it with AuroraMSX and it's not a problem...
Well, keeping on Assembly...
I created a ROM that enters in Screen 1. Now I want to display letter "A" at the top-left screen position, and then stop the program (freeze the computer) so I can admire my great work. How should I do it? I suppose that I must set the correct memory address with the byte 65 (letter A). Is that correct?
Oh, yes. The HALT instruction freezes the computer, right?
No, HALT just waits for the next interrupt. If you DI and then HALT you would indeed lock up the computer.
Well, at the beginning you may want to use BIOS routines a lot. So to print an "A" I guess you could either use the CHPUT routine at $00A2 (assuming that works in SCREEN1, dunno) or use WRVRM at whatever address it could be on in the MSX1 BIOS. There's also routines to send a whole bunch of data to VRAM, but I'm really not very familiar with the MSX1 routines.
Perhaps it's a good idea to first learn on MSX2? It's a lot easier to do, and probably more phun too, since you will get nices results in an early stage. Once you've got the basics down you can always return to MSX1...
To Sonic...
I can´t learn ón an MSX2. I never had one.
Uhm, you ever heard of emulation buddy?
Having openMSX is like having an MSX2. Maybe you can buy one on ebay, just to have the real thing too. No MSX freak can be a true MSX freak without owning an MSX2. Heck, even I have and MSX1 and an MSX2 lying around somewhere for nostalgia's sake!
leandro, no msx-freak can be complete without sd-snatcher running on real hardware
Now it works...
.bios .page 1 .rom .start MY_PROGRAM MY_PROGRAM: Init32 equ 7bh call Init32
Shouldn't your program end with a 'RET' (return)? Always see your own program as a sub-routine for the system.
Note:
CALL <address> + RET can be replaced by JP <address>. This saves a few cycles, 2 bytes of stack space and 1 byte of RAM/ROM space.
(although you shouldn't really care about that since this code is executed only once and you won't run into any memory problems anyway with programs this size )