Comments (3)
I cannot reproduce this error. I used the code:
li a7, 10
ecall
Please share a short program that shows this bug for you.
from rars.
OS: Windows 11.
Java version:
java 17.0.1 2021-10-19 LTS
Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)
Assume a file e.s
has the following code.
.data
msg: .asciz "Hello, world!\n"
.text
main:
lui a0, 0x10010 # a0 = the address of msg. hard-coded
addi a7, zero, 4 # a7 = 4, the system call number for printing a string
ecall # system call
# system call 10: exit with code 0
addi a7, zero, 10 # a7 = 10
ecall # system call
Here is the command and the output, using RARS 1.5.
java -jar .\rars1_5.jar e.s a0 a7
RARS 1.5 Copyright 2003-2019 Pete Sanderson and Kenneth Vollmar
Hello, world!
Program terminated by calling exit
a0 0x10010000
a7 0x0000000a
Here is the command and the output when RARS 1.6 is used. The values of a0
and a7
are not printed. The line "Program terminated by calling exit" is also different.
java -jar .\rars1_6.jar e.s a0 a7
RARS 1.6 Copyright 2003-2019 Pete Sanderson and Kenneth Vollmar
Hello, world!
Here is the command and the output when me
option is used with RARS 1.6.
java -jar .\rars1_6.jar e.s a0 a7 me
RARS 1.6 Copyright 2003-2019 Pete Sanderson and Kenneth Vollmar
Hello, world!
Program terminated by calling exit
a0 0x10010000
a7 0x0000000a
from rars.
Noticed that RARS doesn't output registers if your program prints anything:
$ cat reg1.asm
.text
li a1, 0x1234
li a0, 65 # printchar A
addi a7, zero, 11
ecall
$
$ rars a1 reg1.asm
RARS 1.6 Copyright 2003-2019 Pete Sanderson and Kenneth Vollmar
A$
With no printchar call:
$ cat reg2.asm
# rars nc a1 reg2.asm
.text
li a1, 0x1234
$
$ rars a1 reg2.asm
RARS 1.6 Copyright 2003-2019 Pete Sanderson and Kenneth Vollmar
Program terminated by dropping off the bottom.
a1 0x00001234
$
from rars.
Related Issues (20)
- Global pointer value
- BLT instruction machine code is not correct according to the document
- Crashed while executing ./test/selfmod.s HOT 1
- Native Executable HOT 1
- 0.0 + 0.0 = 0x7dc00000? HOT 2
- Enhancement: assemble new file without saving
- Feature request: GUI size and font size HOT 1
- Messages/Run I/O display console stuck in near-minimized form HOT 2
- sbrk problem HOT 1
- Error in Floating Point Representation tool about subnormal numbers?
- Could not find or load main class HOT 1
- Errors in Help
- Typo in syscalls help of RARS 1.6
- MMIO keybord interrtupt not triggering. HOT 5
- less than symbol < gets lost in tooltips
- MAC Issue HOT 2
- can system call 51 (InputDialogInt) take a hex input?
- Enhancement: allow expressions for immediate values and numeric directives .byte, .half, .word, .dword, etc.
- Can't open or see files HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rars.