Replies: 6 comments 22 replies
-
Yes. You need to create a relevant configuration file. For 16 bit addressing, set the For 16 but words, that's a matter of how your ISA works. You will have to be mindful of things like the size of instruction size and operand size when you are defining your instructions, and their respective endings. But as long as your define it properly, it will work. |
Beta Was this translation helpful? Give feedback.
-
PT16regtest1editlst.txt Hi Michael, Thanks for the update. I have attached files for where I am currently up to. This is still very much a work in progress. PT16regtest1lst.txt is the output from bespokeasm. PT16regtest1editlst.txt is PT16regtest1lst.txt modified to show the adressing that I want to achieve. |
Beta Was this translation helpful? Give feedback.
-
@ptilden I took a look at this over the weekend. I'd need to generalize the concept of "byte code" to be more of "word code" where the word size could be defined (defaulting to 8 bits). While I do see a path to get this done, it won't be a "quick fix". |
Beta Was this translation helpful? Give feedback.
-
PT16regtest1.asm.txt Hi Michael, Here are my test files. I am using reverse_argument_order: to reverse the order of fields in the instruction but it does not seem to be working. I have also attached my ISA document so that you can see what I am trying to achieve. |
Beta Was this translation helpful? Give feedback.
-
@ptilden Please give the description: PT 16 reg
general:
address_size: 16
word_size: 16
multi_word_endianness: big
registers:
- r0
- r1
- r2
- r3
- r4
- r5
- r6
- r7
- r8
- r9
- r10
- r11
- r12
- r13
- r14
- sp
origin: 0
identifier:
name: PT16reg
version: "0.1.0"
extension: asm
min_version: 0.5.0
operand_sets:
16_bit_reg:
operand_values:
r0_reg:
type: register
register: r0
bytecode:
value: 0
size: 4
r1_reg:
type: register
register: r1
bytecode:
value: 1
size: 4
r2_reg:
type: register
register: r2
bytecode:
value: 2
size: 4
r3_reg:
type: register
register: r3
bytecode:
value: 3
size: 4
r4_reg:
type: register
register: r4
bytecode:
value: 4
size: 4
r5_reg:
type: register
register: r5
bytecode:
value: 5
size: 4
r6_reg:
type: register
register: r6
bytecode:
value: 6
size: 4
r7_reg:
type: register
register: r7
bytecode:
value: 7
size: 4
r8_reg:
type: register
register: r8
bytecode:
value: 8
size: 4
r9_reg:
type: register
register: r9
bytecode:
value: 9
size: 4
r10_reg:
type: register
register: r10
bytecode:
value: 10
size: 4
r11_reg:
type: register
register: r11
bytecode:
value: 11
size: 4
r12_reg:
type: register
register: r12
bytecode:
value: 12
size: 4
r13_reg:
type: register
register: r13
bytecode:
value: 13
size: 4
r14_reg:
type: register
register: r14
bytecode:
value: 14
size: 4
sp_reg:
type: register
register: sp
bytecode:
value: 15
size: 4
uint16_no_bytecode:
operand_values:
uint16:
type: numeric
argument:
size: 16
byte_align: true
endian: big
uint6_no_bytecode:
operand_values:
uint6:
type: numeric
argument:
size: 6
byte_align: false
max: 63
min: 0
instructions:
# General
nop:
# no operation
bytecode:
value: 0
size: 16
# Data Transfer
ld:
bytecode:
value: 0x08
size: 8
operands:
count: 3
operand_sets:
reverse_argument_order:
list:
- 16_bit_reg
- 16_bit_reg
- uint16_no_bytecode
ldi:
bytecode:
value: 0x100
size: 12
operands:
count: 2
operand_sets:
list:
- 16_bit_reg
- uint16_no_bytecode
ldr:
bytecode:
value: 0x0c
size: 8
operands:
count: 2
operand_sets:
reverse_argument_order:
list:
- 16_bit_reg
- 16_bit_reg
ldis:
bytecode:
value: 0x5
size: 6
operands:
count: 2
operand_sets:
reverse_argument_order:
list:
- 16_bit_reg
- uint6_no_bytecode |
Beta Was this translation helpful? Give feedback.
-
@ptilden I have merged all the changes necessary to support arbitrary data word sizes, and thus your 16-bit word ISA with the release of v0.5.0 (#38). There are probably many more things I can do to add more robust support here (e.g. configuring how byte-strings are mapped to 16-bit+ words), but I'll leave those to different features. Closing this discussion for not. For any new features, please open a new discussion. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am building a homebrew 16 bit computer where a memory address refers to a 16 bit word (i.e. the bytes in a word are not individually addressable). Is the any way to configure bespokeasm to do this?
Beta Was this translation helpful? Give feedback.
All reactions