Assembly information (Development MSX Fora)MSX Resource Center MSX Info Update - Finnish MSX madness at its best           
            
English Nederlands Español Português Russian         
 Nieuws
   Voorpagina
  Nieuws archief
  Nieuws onderwerpen

 Informatie
   MSX Fora
  Artikelen
  Recensies
  Beursverslagen
  Fotoreportages
  Beurzen en meetings
  Enquêtes
  Links
  Zoek

 Software
   Downloads
  Webshop

 MRC
   Wie we zijn
  Kom bij ons team
  Doneren
  Policies
  Contact met het MRC
  Link naar Ons
  Statistieken

 Zoek
 
  

  

 Login
 

Gebruikersnaam

Wachtwoord




Ben je nog niet lid? Klik hier en word MSX vriend!


 Statistieken
 

Er zijn 64 gasten en 6 MSX vrienden online

Je bent een anonieme bezoeker.
 

MSX Fora


MSX Fora

Development - Assembly information

Ga naar pagina ( Vorige pagina 1 | 2 | 3 | 4 Volgende pagina )
Schrijver

Assembly information

[D-Tail]

msx guru
Berichten: 3018
Geplaatst: 26 November 2004, 18:41   
ASM call == BASIC gosub
ASM jp/jr == BASIC goto

that's more or less equivalents. When you write down:
INIT32 equ 7Bh
call INIT32
you're implying this:
let INIT32=&h7B: gosub INIT32
Hope that clears up a lot
Thom
msx addict
Berichten: 377
Geplaatst: 26 November 2004, 18:47   
Or: EQU is the equivalent of #DEFINE in C. (well... a bit)
manuel
online
msx guru
Berichten: 3451
Geplaatst: 26 November 2004, 19:04   
Quote:

Quote:

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...
LeandroCorreia
msx addict
Berichten: 451
Geplaatst: 26 November 2004, 19:48   
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?
LeandroCorreia
msx addict
Berichten: 451
Geplaatst: 26 November 2004, 20:53   
Oh, yes. The HALT instruction freezes the computer, right?
Sonic_aka_T

msx guru
Berichten: 2268
Geplaatst: 26 November 2004, 21:02   
No, HALT just waits for the next interrupt. If you DI and then HALT you would indeed lock up the computer.
Sonic_aka_T

msx guru
Berichten: 2268
Geplaatst: 26 November 2004, 21:07   
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...
LeandroCorreia
msx addict
Berichten: 451
Geplaatst: 26 November 2004, 21:18   
To Sonic...

I can´t learn ón an MSX2. I never had one.
Sonic_aka_T

msx guru
Berichten: 2268
Geplaatst: 26 November 2004, 21:21   
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!
wolf_
online

msx legend
Berichten: 4719
Geplaatst: 26 November 2004, 21:30   
leandro, no msx-freak can be complete without sd-snatcher running on real hardware
MOA
msx freak
Berichten: 148
Geplaatst: 26 November 2004, 22:26   
Quote:

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 )

LeandroCorreia
msx addict
Berichten: 451
Geplaatst: 27 November 2004, 02:39   
Actually, I am generating a ROM with my code. I guess that a Return would not be so useful.

About having an MSX2... I don't think so... I'd rather buy the new MSX next year.
I am not addicted to MSX hardware, but to MSX software. Besides, after I plugged a Playstation-like gamepad into my computer (that's at my TV side), I can gladly play MSX in full screen in a TV.
sjoerd
msx addict
Berichten: 449
Geplaatst: 27 November 2004, 03:33   
Did you take a look at my helloworld example?
LeandroCorreia
msx addict
Berichten: 451
Geplaatst: 27 November 2004, 03:37   
To Sjoerd...
Yes, and I did not understand at that time. Sorry! I was very busy trying just to compile my first program and so I almost forgot it. I'll check it real soon.
NYYRIKKI
msx master
Berichten: 1511
Geplaatst: 27 November 2004, 08:27   
If you want to understand, how the VDP and Z80 works, maybe you want to take a look at this another Hello World example. This actually is replacement for BIOS, so it does not use any external routines:

www.roesler-ac.de/wolfram/hello.htm#Assembler-Z80-Console

Don't get scared, it does not need to be this hard you know
 
Ga naar pagina ( Vorige pagina 1 | 2 | 3 | 4 Volgende pagina )
 







(c) 1994 - 2008 Stichting MSX Resource Center. MSX is een trademark van MSX Licensing Corporation.