We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fee2a34 + cd4a858 commit ef8de7fCopy full SHA for ef8de7f
2 files changed
lib/random.asm
@@ -3,8 +3,6 @@
3
* https://github.com/c128lib/framework
4
*/
5
6
-// #import "chipset/lib/vic2.asm"
7
-
8
#importonce
9
.filenamespace c128lib
10
@@ -22,7 +20,6 @@
22
20
23
21
Params:
24
.A - Seed
25
26
27
.macro PseudoRandom() {
28
beq doEor
spec/random.spec.asm
@@ -0,0 +1,32 @@
1
+#import "128spec/lib/128spec.asm"
2
+
+sfspec:
+ init_spec()
+ describe("PseudoRandom")
+ it("From zero"); {
+ // Arrange
+ lda #0
11
12
+ // Act
13
+ c128lib_PseudoRandom()
14
15
+ // Assert
16
+ sta number1
17
+ SetValue8Bit(expected, $1d)
18
+ assert_bytes_equal 1: number1: expected
19
+ }
+ finish_spec()
+* = * "Data"
+number1: .byte 0
+expected: .byte 0
+.macro SetValue8Bit(variable, value) {
+ lda #value
29
+ sta variable
30
+}
31
32
+#import "../lib/random-global.asm"
0 commit comments