Assembly code equivelant to Javas System.out.print()

Thread Starter


Joined Dec 20, 2015
Hi, one thing that I find makes Assembly harder to learn than Java is that it is much harder to troubleshoot.
For example in Java I can write a few System.out.println-lines to keep me informed about the current status/value of a variable.

Is there something equivelant or similar for Assembly?
For example to get the value of R22 printed in the console during execution of code.

LDI R22, 0xFF
CPI R22,10
BRNE test


Joined Mar 31, 2012
Assembly is harder in most respects precisely because it is a very, very low level language that gives you as much control of the machine as you can hope to have. The price to pay for that is that it is harder to use.

As for something equivalent in Assembly, don't count on it. The Java println() method, as well as comparable I/O procedures in other languages, are extremely complex functions that are able to handle data in many different formats -- that's a lot of code.

But there is no way that anyone here can even make suggestions because you give no hint as to which Assembly language you are using, what processor, what assembler, nothing.


Joined Mar 31, 2012
I see. Thanks for the answer. I am using a ATmega32u4 CPU and Atmel studio.
So look through the documentation for Atmel studio and see what higher-level macros are available to you.

A lot of it will depend on what BIOS/monitor system calls you have available.

There's also nothing that prevents you from writing your own comparable subroutines.