Rdcpu16 0.0.3.1 → 0.0.4.alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,29 +0,0 @@
1
- ; Try some basic stuff
2
- SET A, 0x30 ; 7c01 0030
3
- SET [0x1000], 0x20 ; 7de1 1000 0020
4
- SUB A, [0x1000] ; 7803 1000
5
- IFN A, 0x10 ; c00d
6
- SET PC, crash ; 7dc1 001a [*]
7
-
8
- ; Do a loopy thing
9
- SET I, 10 ; a861
10
- SET A, 0x2000 ; 7c01 2000
11
- :loop SET [0x2000+I], [A] ; 2161 2000
12
- SUB I, 1 ; 8463
13
- IFN I, 0 ; 806d
14
- SET PC, loop ; 7dc1 000d [*]
15
-
16
- ; Call a subroutine
17
- SET X, 0x4 ; 9031
18
- JSR testsub ; 7c10 0018 [*]
19
- SET PC, crash ; 7dc1 001a [*]
20
-
21
- :testsub SHL X, 4 ; 9037
22
- SET PC, POP ; 61c1
23
-
24
- ; Hang forever. X should now be 0x40 if everything went right.
25
- :crash SET PC, crash ; 7dc1 001a [*]
26
-
27
- ; [*]: Note that these can be one word shorter and one cycle faster by using the short form (0x00-0x1f) of literals,
28
- ; but my assembler doesn't support short form labels yet.
29
-
@@ -1,10 +0,0 @@
1
- require 'spec_helper.rb'
2
-
3
- describe DCPU16::Assembler do
4
- let(:asm) { File.open(File.join('spec', 'fixtures', 'example.asm')).read }
5
- subject { DCPU16::Assembler.new(asm) }
6
-
7
- its(:input) { should == asm }
8
- # its(:dump) { should be_a_kind_of(Array) }
9
- end
10
-
@@ -1,6 +0,0 @@
1
- require 'spec_helper.rb'
2
-
3
- describe DCPU16::Register do
4
- subject { DCPU16::Register.new(0x00) }
5
- end
6
-