Assembly vs BASIC

From Maze

(Difference between revisions)
Jump to: navigation, search
Line 36:Line 36:
BASIC makes both of these acts compact and accessible. Print a character, generate a random number. Normally, carrying out either of these in assembly is an arduous task. Here's an example of a commonly used routine for generating a random 8-bit number in 6502 assembly:
BASIC makes both of these acts compact and accessible. Print a character, generate a random number. Normally, carrying out either of these in assembly is an arduous task. Here's an example of a commonly used routine for generating a random 8-bit number in 6502 assembly:
−
<pre
+
<pre>
Rand8
Rand8
lda random ; get seed from memory (must be non-zero)
lda random ; get seed from memory (must be non-zero)

Revision as of 00:52, 7 August 2010

View this revision of Assembly vs BASIC.

Personal tools