Search the web
Sign In
New User? Sign Up
vmu-dev · The VMU Development list
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Some ASM newbie questions   Message List  
Reply | Forward Message #352 of 1156 |
So, okay. I just noticed that I had no idea of how to get a random
number. I took Marcus' Tetris out, but it looks like he's
implementing his own. I only sorta know how RNGs work; not well
enough to write my own in a high-level language, and certainly not in
ASM, which I'm just now learning. I can't follow Marcus' RNG without
comments, I think.

What's more, when I go and look for RNGs, I tend to get big complex
ones that are suitable for mathematicians, or for statisticians, or
for cryptographers - things that it would just be stupid to implement
on the VMU. The basic ones that are built into most languages are
sufficient for things like this, and thus don't seem to get
duplicated
often enough for me to find them on the World Wide Mess.

I was wondering if anyone has a good, simple RNG? I'd like to have
an
8-bit and a 16-bit one, but if the 8-bit one has a good distribution
(or however you'd say that), it seems like I ought to be able to
juststick two outputs together and call it a bigger variable, and
there I am.

If not, does anyone know where there's a reasonable overview on the
web somewhere of how RNGs work, so I can try to create my own? If
they give examples, I'd really prefer something normal like C,
Pascal,
Lisp, or shell, or something; ALGOL-90 isn't going to do me any good
(I say this only because I can't find an example in a normal
language,
so this may well be a useful differentiation to make).

On a seperate note, I'm beginning to wrestle with the notion of
having
to actually plan *where* my variables go. Out of all of the examples
I have, the addresses pretty much don't coincide - this guy uses $30,
that guy uses $40, and so on.

I'm a little worried because I don't know how to figure out how big
the code that my instructions are going to create is, and my project
is going to use a *lot* of instructions; how do I make sure that the
instructions don't run into the space I've got defined for my
variables? will the assembler move around them, or do I have to take
that into account?

One thing that occurred to me would be to begin defining variables at
the end of the possible program space, and move towards the
beginning.
That way, the only problem that would ever occur is if the two don't
fit together, and then I know what the nessecary solution is
immediately (no "maybe I can just move this here..."-ing).

I've seen people do some pad thing with nop to $200; is that them
putting no-ops in up to the address $200, implicating $200 as the
point to start defining backwards from? Am I reading that wrong?

Lastly, does anyone have any clue how to get two VMUs to talk to each
other over the link?

Thanks.

- StoneCypher




Sun Jul 9, 2000 6:22 pm

stonecypher@...
Send Email Send Email

Forward
Message #352 of 1156 |
Expand Messages Author Sort by Date

So, okay. I just noticed that I had no idea of how to get a random number. I took Marcus' Tetris out, but it looks like he's implementing his own. I only...
John
stonecypher@...
Send Email
Jul 9, 2000
6:24 pm

Hi, [no idea about RNG, sorry] ... Variables are stored in the data segment which is the usable bank of RAM (256-bytes). The rest is stored in code segment,...
Omar Cornut
cornut@...
Send Email
Jul 9, 2000
6:49 pm
Soeren Gust
sgust@...
Send Email
Jul 11, 2000
5:53 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help