*Very* new to ASM. Where to start?

Pagina 1/5
| 2 | 3 | 4 | 5

Door Mirg

Expert (88)

afbeelding van Mirg

04-09-2005, 15:23

Hey everyone. It's nice to see that MSX is still so very alive. I've owned an MSX 1 (VG8020) since I was about 12, and I've written quite a lot of simple BASIC games back in the days. I have a couple of MSX computers right now, and I'd really like to learn to code ASM on my F700D. I don't plan to "release" anything, I just want to have some fun with ASM and try if I can get some sprites to pop up, that sort of thing.

My problem: I know where to find information about ASM, it's been linked in quite a number of topics. I don't know *how* to code ASM, though. Is there a ROM I should buy that has an ASM-compiler, or do I write ASM in DATA-lines in BASIC or something like that? I have no idea where to put my ASM code, let alone compile it, heh. Big smile

Aangemeld of registreer om reacties te plaatsen

Van wolf_

Ambassador_ (9906)

afbeelding van wolf_

04-09-2005, 15:26

There are a number of assemblers available.. WB-Ass2, Compass, etc. on MSX and TNIasm, Sjasm etc. on PC (crossdev.)

Here's a lot to find: http://map.tni.nl/
http://icarus.ticalc.org/articles/z80_faq.html

Perhaps you can try to find a number of Z80 books..

You need some databook of the MSX vdp chips as well I guess..

And you need to ask around here.. plenty o' coders ready to assist!

Van norakomi

Paragon (1095)

afbeelding van norakomi

04-09-2005, 16:44

Hey Mirg !!!

Welcome man !!
I just started assembly less than a year ago, and I love it so much !!!
What I'm using is Wbass2 (downloadable wherever), which is a great assembler.
Flop it in your msx, or use an emulator (Bluemsx is great) and the assembler starts.
type: EDIT to start coding......

you have to start coding at an address in memory, (with an msx having 64 kb memory,
you can start coding at address $0000-$FFFF)
the string ($) is for hexadecimal.

O.k. I'll try to make it simple by using some examples, that works best for me....

Lets say you want to start coding at memory location $C000

Then when the computer boots and Wbass2 is loaded you type

EDIT

(then in the editor you typeSmile

ORG $C000 (this means you programm starts at address $C000)

then you can load something into variable a like:

ld a,"H" (load a with the symbol "H")
or
ld a,50 (load a with the value "50", you can compare this with the basic instruction a=50)

You can print to screen whatever is inside variable a by typing

call $a2

end the programm by typing RET

so the program to print whatever is in "a" to screen looks like this:

ORG $C000
ld a,"t"
call $a2
ret

then go back to the assembler (control-c)

and assemble the programm into memory by typing:
ASM

after that run the programm by typing
GO $C000

O.k. reading the manual from WBASS2 teaches you much.....

about sprites
http://www.funet.fi/pub/msx/programming/asm/sources/
there is an assembly file called stars.asm which shows stars (1 dot sprites) moving horizontaly over the screen. Check it out, it's an intersting small piece of code.

anyway,

remember that you can allways come here for questions, everybody here is incredibly nice and helpfull !!!

HAVE FUN !!!

Van wolf_

Ambassador_ (9906)

afbeelding van wolf_

04-09-2005, 18:36

Van Mirg

Expert (88)

afbeelding van Mirg

05-09-2005, 10:32

Thanks for the great links, guys! I'm giving WBASS2 a whirl this evening. I've been brushing up my BASIC (woohoo) a bit to understand how the MSX worked with sprites / pages / etc again, heh. Big smile

Van ARTRAG

Enlighted (6578)

afbeelding van ARTRAG

05-09-2005, 13:31

My hint is use sjasm and do cross developement
You can get the best from PC and use openMSX
AR

Van kanima

Master (194)

afbeelding van kanima

05-09-2005, 14:12

I've been brushing up my BASIC (woohoo) a bit to understand how the MSX worked with sprites / pages / etc again, heh. Big smile

Well, while you're at it, why don't you give the MRC Oneliner Challenge a go as well then? Smile The more entries the merrier Smile

Van Mirg

Expert (88)

afbeelding van Mirg

05-09-2005, 16:29

I think your and my "brushing up" are two completely different things. Tongue

Right now, I'm doing things like this:

10 A$=INKEY$:IFA$=""THEN10
20 PRINTASC(A$):GOTO10

Not exactly one-liner material. (I even need two lines to do something amazingly simple like printing out inkey codes!) Crying

Van ARTRAG

Enlighted (6578)

afbeelding van ARTRAG

05-09-2005, 16:31

10 A$=INKEY$:IFA$=""THEN10 ELSE PRINTASC(A$):GOTO10

Now it is perfect for one-liner competition :-)

Van spl

Paragon (1470)

afbeelding van spl

05-09-2005, 20:21

For ASM, please, visit and ask everything you want here:

http://forum.karoshicorp.com :D Where you will find asm coders :)

Yours,

Van wolf_

Ambassador_ (9906)

afbeelding van wolf_

05-09-2005, 20:35

tsk .. tsk .. ! shameless, shameless Smile

Pagina 1/5
| 2 | 3 | 4 | 5