z80_disassembler 0.1.1 → 0.1.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e42aae94b0a155376a9908a01021170bc5c0ef1c585edf3e0fe29709800bd09b
4
- data.tar.gz: dc317870df745ae9e22e0f63529d87a55c576471d255e5b6c247d56315447684
3
+ metadata.gz: 10ca0748d50c8d00bb27bc23da607dc4c749d9c017348d20046ca37776aed136
4
+ data.tar.gz: 2407cc63119e48386a33bb0e448428423c820bde25e85c79a5a93c700c106251
5
5
  SHA512:
6
- metadata.gz: 870c6f6d8a9022a91b73c5b389c4ef14355287faac6e13addc3b9105a54b4a14759b7c3525146387d3eb41af0aa149b4e851cca425543de2ba50e8a3d2663d99
7
- data.tar.gz: f1dae199fb41fef2a94504e206ddc6e1a0909aa092d2d36662f097c10ee4b6b575f220fa1aac73b79f58de9a0afbb97a1c729afbb6ccb9d35aeac5e916ce8c22
6
+ metadata.gz: 0c08d4acbf8e07f739f383e963d0a4c36573b3c1c4a7b53389d2fb00e1973f1cca95af6ee1462d702d213fd185f10e6ae662f427e2000ef84a48b2bf28c201ca
7
+ data.tar.gz: 8c24ea1e6c040901e7d8409d9cd8f44913a5ed426adba4bca0e09080af091a55b9eacbdf007c57ca9db2a74a0ff268b966f8c4dec54c74acd93eeb3fc69903bf
data/README.md CHANGED
@@ -27,8 +27,9 @@ Or install it yourself as:
27
27
 
28
28
  - example: parse.C >> parse.C.txt and compare with parse.txt
29
29
  ```ruby
30
- Z80Disassembler::Disassembler.new(params[:file], params[:org]).start
30
+ Z80Disassembler::Disassembler.new(params[:file], 32768).start
31
31
  ```
32
+ return hash { 32768=>["#8000", "PUSH IY", "fd e5"], 32770=>[...], ... }
32
33
 
33
34
  ## Development
34
35
 
@@ -53,7 +53,6 @@ module Z80Disassembler
53
53
  @addr += @bytes.size
54
54
  @bytes = []
55
55
  end
56
-
57
56
  result
58
57
  end
59
58
 
@@ -70,6 +69,8 @@ module Z80Disassembler
70
69
  temp.sub(' H', " #{reg}H")
71
70
  elsif temp.include?(',H')
72
71
  temp.sub(',H', ",#{reg}H")
72
+ else
73
+ temp
73
74
  end
74
75
  end
75
76
 
@@ -97,8 +98,8 @@ module Z80Disassembler
97
98
  case @y
98
99
  when 0 then 'NOP'
99
100
  when 1 then 'EX AF, AF\''
100
- when 2 then calc_bytes(->(a, b){ "DJNZ ##{b}" }, nil, 1)
101
- when 3 then calc_bytes(->(a, b){ "JR ##{b}" }, nil, 1)
101
+ when 2 then calc_bytes(->(a, b){ "DJNZ ##{b}" }, nil, 1)
102
+ when 3 then calc_bytes(->(a, b){ "JR ##{b}" }, nil, 1)
102
103
  else calc_bytes(->(a, b){ "JR #{a},##{b}" }, T_CC[@y - 4], 1)
103
104
  end
104
105
  when 1 then @q ? "ADD HL,#{T_RP[@p]}" : calc_bytes(->(a, b){ "LD #{a},##{b}" }, T_RP[@p], 2)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Z80Disassembler
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: z80_disassembler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - dvitvitskiy