diff options
| author | Melodi <62381002+Melodi17@users.noreply.github.com> | 2025-08-07 00:02:00 +1000 |
|---|---|---|
| committer | Melodi <62381002+Melodi17@users.noreply.github.com> | 2025-08-07 00:02:00 +1000 |
| commit | 33e1c5fc6e37549b4eba833ae7e534f9da250b10 (patch) | |
| tree | 051c846326eae94712337baf4ac65ce837d02b95 /ROMs | |
| parent | 7a8d2bcd75d88a5429937bf551878c55e1dcf0fd (diff) | |
added binary, logical and bitwise operators to compiler
Diffstat (limited to 'ROMs')
| -rw-r--r-- | ROMs/hello_c.asm | 11 | ||||
| -rw-r--r-- | ROMs/hello_c.c | 2 | ||||
| -rw-r--r-- | ROMs/hello_c.q1 | bin | 22 -> 22 bytes |
3 files changed, 7 insertions, 6 deletions
diff --git a/ROMs/hello_c.asm b/ROMs/hello_c.asm index 292b99a..8cdf58b 100644 --- a/ROMs/hello_c.asm +++ b/ROMs/hello_c.asm @@ -1,7 +1,8 @@ _main: -ADD 1, 2 -SUB 4, 1 -MUL AX, AX -MOV AX, V0 -RET + push 0 + mov 1, V1 + pop V0 + or V0, V1 + mov DX, V0 + ret diff --git a/ROMs/hello_c.c b/ROMs/hello_c.c index 46eab8d..1f79a53 100644 --- a/ROMs/hello_c.c +++ b/ROMs/hello_c.c @@ -1,4 +1,4 @@ int main() { - return (1 + 2) * (4 - 1); + return 0 | 1; }
\ No newline at end of file diff --git a/ROMs/hello_c.q1 b/ROMs/hello_c.q1 Binary files differindex deffc80..5e4d71e 100644 --- a/ROMs/hello_c.q1 +++ b/ROMs/hello_c.q1 |
