pervognsen / bitwise

Bitwise is an educational project where we create the software/hardware stack for a computer from scratch.
Other
5.14k stars 212 forks source link

Small additions to .uint8, .uint16 and .uint32 #66

Closed Nazfib closed 6 years ago

Nazfib commented 6 years ago

I added the ability to specify multiple numbers at once for the .uint commands, i.e. you can now specify

.uint32 1, 2, 3, 4

and it will assemble all four values into the buffer.

In addition, .uint8 now supports string literals;

.uint8 "Hello, World!"

will assemble the ascii valules of the characters into the buffer. The string is not zero-terminated automatically; to assemble a C-style zero-terminated string, use .uint8 "test", 0; for a FORTH-style length-prefixed string, use .uint8 4, "test"

Nazfib commented 6 years ago

You have already implemented these in a similar way yourself. Closing the PR.