Skip to content

Commit

Permalink
Bump version to 1.0.0. Update (dis)assemblies in top-level doc. Updat…
Browse files Browse the repository at this point in the history
…e manpages
  • Loading branch information
nabijaczleweli committed Feb 26, 2020
1 parent 4461e92 commit 91fdd4d
Show file tree
Hide file tree
Showing 6 changed files with 265 additions and 132 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ keywords = ["isa", "emulation", "cpu"]
categories = ["emulators"]
license = "MIT"
# Remember to also update in appveyor.yml
version = "0.1.1"
version = "1.0.0"
# Remember to also update in man/*.md
authors = ["nabijaczleweli <nabijaczleweli@gmail.com>"]
exclude = ["*.enc"]
Expand Down
14 changes: 7 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.1.1-{build}
version: 1.0.0-{build}

skip_tags: false

Expand Down Expand Up @@ -30,19 +30,19 @@ build_script:
- make
- cargo build --verbose --release
-
- mkdir pir-8-emu-v0.1.1
- cp target\release\pir-8-as.exe target\release\pir-8-disasm.exe target\release\pir-8-emu.exe pir-8-emu-v0.1.1\
- cp C:\BearLibTerminal.dll pir-8-emu-v0.1.1\
- strip --strip-all --remove-section=.comment --remove-section=.note pir-8-emu-v0.1.1/pir-8-as.exe pir-8-emu-v0.1.1/pir-8-disasm.exe pir-8-emu-v0.1.1/pir-8-emu.exe
- zip -9r pir-8-emu-v0.1.1.zip pir-8-emu-v0.1.1
- mkdir pir-8-emu-v1.0.0
- cp target\release\pir-8-as.exe target\release\pir-8-disasm.exe target\release\pir-8-emu.exe pir-8-emu-v1.0.0\
- cp C:\BearLibTerminal.dll pir-8-emu-v1.0.0\
- strip --strip-all --remove-section=.comment --remove-section=.note pir-8-emu-v1.0.0/pir-8-as.exe pir-8-emu-v1.0.0/pir-8-disasm.exe pir-8-emu-v1.0.0/pir-8-emu.exe
- zip -9r pir-8-emu-v1.0.0.zip pir-8-emu-v1.0.0

test: off
test_script:
# The tests would finish successfully but AppVeyor would report a failure
- cargo test --verbose --release || true

artifacts:
- path: pir-8-emu-v0.1.1.zip
- path: pir-8-emu-v1.0.0.zip

deploy:
provider: GitHub
Expand Down
16 changes: 8 additions & 8 deletions man/pir-8-as.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ The assembly format is as follows:

And so, all of these are equivalent:

LOAD IND A
0x0110
LOAD IMM A
0x69

LOAD IND A
0b0000_0001_0001_0000
LOAD IMM A
0b0110_1001

0x24
0o420
0x1C
0o151

36
272
28
105

## DIRECTIVES

Expand Down
247 changes: 171 additions & 76 deletions man/pir-8-disasm.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,82 +56,177 @@ The output consists of four columns:

## EXAMPLES

`pir-8-disasm test-data/xor-swap-with-loads.p8b`

00000000 24 LOAD IND A
00000002 0110 D 0x0110
00000003 1D LOAD IMM B
00000004 69 D 0x69
00000005 62 MOVE A X
00000006 6B MOVE B Y
00000007 35 ALU XOR
00000008 4C MOVE S A
00000009 63 MOVE A Y
0000000A 6A MOVE B X
0000000B 35 ALU XOR
0000000C 4D MOVE S B
0000000D 62 MOVE A X
0000000E 6B MOVE B Y
0000000F 35 ALU XOR
00000010 4C MOVE S A
00000011 FF HALT

`pir-8-disasm -r 01234567 test-data/xor-swap-with-loads.p8b`

00000000 24 LOAD IND 4
00000002 0110 D 0x0110
00000003 1D LOAD IMM 5
00000004 69 D 0x69
00000005 62 MOVE 4 2
00000006 6B MOVE 5 3
00000007 35 ALU XOR
00000008 4C MOVE 1 4
00000009 63 MOVE 4 3
0000000A 6A MOVE 5 2
0000000B 35 ALU XOR
0000000C 4D MOVE 1 5
0000000D 62 MOVE 4 2
0000000E 6B MOVE 5 3
0000000F 35 ALU XOR
00000010 4C MOVE 1 4
00000011 FF HALT

`pir-8-disasm -e 3 test-data/xor-swap-with-loads.p8b`

00000000 1D LOAD IMM B
00000001 69 D 0x69
00000002 62 MOVE A X
00000003 6B MOVE B Y
00000004 35 ALU XOR
00000005 4C MOVE S A
00000006 63 MOVE A Y
00000007 6A MOVE B X
00000008 35 ALU XOR
00000009 4D MOVE S B
0000000A 62 MOVE A X
0000000B 6B MOVE B Y
0000000C 35 ALU XOR
0000000D 4C MOVE S A
0000000E FF HALT

`pir-8-disasm -k 1,7 test-data/xor-swap-with-loads.p8b`

00000000 24 LOAD IND A
00000002 0110 D 0x0110
00000003 1D LOAD IMM B
00000004 69 D 0x69
00000005 62 MOVE A X
00000006 6B MOVE B Y
00000007 35 ALU XOR
00000008 S skipping 0x07 bytes
00000010 4C MOVE S A
00000011 FF HALT

`pir-8-disasm -e 3 -k 1,0x0D test-data/xor-swap-with-loads.p8b`

00000000 1D LOAD IMM B
00000001 S skipping 0x0D bytes
0000000E FF D 0xFF
`pir-8-disasm test-data/copy-any-length-literal-to-port-nolit.p8b`

00000000 1E LOAD IMM C
00000001 00 D 0x00
00000002 1A LOAD IMM X
00000003 27 D 0x27
00000004 1B LOAD IMM Y
00000005 01 D 0x01
00000006 31 ALU SUB
00000007 4A MOVE S X
00000008 4F MOVE S D
00000009 7A MOVE D X
0000000A 1B LOAD IMM Y
0000000B 01 D 0x01
0000000C 30 ALU ADD
0000000D 4F MOVE S D
0000000E 72 MOVE C X
0000000F 1B LOAD IMM Y
00000010 00 D 0x00
00000011 32 ALU ADDC
00000012 4E MOVE S C
00000013 0D MADR WRITE C&D
00000014 1C LOAD IMM A
00000015 00 D 0x00
00000016 25 LOAD IND B
00000017 E5 PORT OUT B
00000018 69 MOVE B S
00000019 F1 COMP S
0000001A 1C LOAD IMM A
0000001B 00 D 0x00
0000001C 1D LOAD IMM B
0000001D 26 D 0x26
0000001E 0C MADR WRITE A&B
0000001F 14 JMZG
00000020 1C LOAD IMM A
00000021 00 D 0x00
00000022 1D LOAD IMM B
00000023 09 D 0x09
00000024 0C MADR WRITE A&B
00000025 17 JUMP
00000026 FF HALT

`pir-8-disasm -r 01234567 test-data/copy-any-length-literal-to-port-nolit.p8b`

00000000 1E LOAD IMM 6
00000001 00 D 0x00
00000002 1A LOAD IMM 2
00000003 27 D 0x27
00000004 1B LOAD IMM 3
00000005 01 D 0x01
00000006 31 ALU SUB
00000007 4A MOVE 1 2
00000008 4F MOVE 1 7
00000009 7A MOVE 7 2
0000000A 1B LOAD IMM 3
0000000B 01 D 0x01
0000000C 30 ALU ADD
0000000D 4F MOVE 1 7
0000000E 72 MOVE 6 2
0000000F 1B LOAD IMM 3
00000010 00 D 0x00
00000011 32 ALU ADDC
00000012 4E MOVE 1 6
00000013 0D MADR WRITE C&D
00000014 1C LOAD IMM 4
00000015 00 D 0x00
00000016 25 LOAD IND 5
00000017 E5 PORT OUT 5
00000018 69 MOVE 5 1
00000019 F1 COMP 1
0000001A 1C LOAD IMM 4
0000001B 00 D 0x00
0000001C 1D LOAD IMM 5
0000001D 26 D 0x26
0000001E 0C MADR WRITE A&B
0000001F 14 JMZG
00000020 1C LOAD IMM 4
00000021 00 D 0x00
00000022 1D LOAD IMM 5
00000023 09 D 0x09
00000024 0C MADR WRITE A&B
00000025 17 JUMP
00000026 FF HALT

`pir-8-disasm -e 9 test-data/copy-any-length-literal-to-port-nolit.p8b`

00000000 7A MOVE D X
00000001 1B LOAD IMM Y
00000002 01 D 0x01
00000003 30 ALU ADD
00000004 4F MOVE S D
00000005 72 MOVE C X
00000006 1B LOAD IMM Y
00000007 00 D 0x00
00000008 32 ALU ADDC
00000009 4E MOVE S C
0000000A 0D MADR WRITE C&D
0000000B 1C LOAD IMM A
0000000C 00 D 0x00
0000000D 25 LOAD IND B
0000000E E5 PORT OUT B
0000000F 69 MOVE B S
00000010 F1 COMP S
00000011 1C LOAD IMM A
00000012 00 D 0x00
00000013 1D LOAD IMM B
00000014 26 D 0x26
00000015 0C MADR WRITE A&B
00000016 14 JMZG
00000017 1C LOAD IMM A
00000018 00 D 0x00
00000019 1D LOAD IMM B
0000001A 09 D 0x09
0000001B 0C MADR WRITE A&B
0000001C 17 JUMP
0000001D FF HALT

`pir-8-disasm -k 0x1A,11 test-data/copy-any-length-literal-to-port-nolit.p8b`

00000000 1E LOAD IMM C
00000001 00 D 0x00
00000002 1A LOAD IMM X
00000003 27 D 0x27
00000004 1B LOAD IMM Y
00000005 01 D 0x01
00000006 31 ALU SUB
00000007 4A MOVE S X
00000008 4F MOVE S D
00000009 7A MOVE D X
0000000A 1B LOAD IMM Y
0000000B 01 D 0x01
0000000C 30 ALU ADD
0000000D 4F MOVE S D
0000000E 72 MOVE C X
0000000F 1B LOAD IMM Y
00000010 00 D 0x00
00000011 32 ALU ADDC
00000012 4E MOVE S C
00000013 0D MADR WRITE C&D
00000014 1C LOAD IMM A
00000015 00 D 0x00
00000016 25 LOAD IND B
00000017 E5 PORT OUT B
00000018 69 MOVE B S
00000019 F1 COMP S
0000001A S skipping 0x0B bytes
00000025 17 JUMP
00000026 FF HALT

`pir-8-disasm -e 3 -k 1,0x0D test-data/copy-any-length-literal-to-port-nolit.p8b`

00000000 7A MOVE D X
00000001 1B LOAD IMM Y
00000002 01 D 0x01
00000003 30 ALU ADD
00000004 4F MOVE S D
00000005 72 MOVE C X
00000006 1B LOAD IMM Y
00000007 00 D 0x00
00000008 32 ALU ADDC
00000009 4E MOVE S C
0000000A 0D MADR WRITE C&D
0000000B 1C LOAD IMM A
0000000C 00 D 0x00
0000000D 25 LOAD IND B
0000000E E5 PORT OUT B
0000000F 69 MOVE B S
00000010 F1 COMP S
00000011 S skipping 0x0B bytes
0000001C 17 JUMP
0000001D FF HALT

## AUTHOR

Expand Down
Loading

0 comments on commit 91fdd4d

Please sign in to comment.