Posts Tagged ‘Assembly language’

Perfect number check and ROT-13 encryption in MIPS-assembly code

MIPS Ingenic JZ4730 SoC in the Skytone Alpha 400

Perfect number check The perfect number check in MIPS is quite easy to realize. Here is some pythonic Pseudocode And here is the MIPS-Code: ROT-13 encryption The basic idea for encrypting a string with ROT-13 is to loop over all characters and use the ASCII-Table to shift them. Here is the ROT-13 MIPS-Code: A syntax-highlighted [...]

How to print MIPS assembly code in LaTeX

LaTeX Logo

If you like to print highlighted MIPS assembly code in LaTeX, you can use the listings package. Sadly, no MIPS language file exits by default in LaTeX, but awg has created one and provides it on his blog. Just download mips.sty (thanks to Adam Gordon!) and place it in your project folder. Then you can [...]

Add MIPS syntax highlighting to gEdit

MIPS Ingenic JZ4730 SoC in the Skytone Alpha 400

I have to code some little programs in MIPS assembly language for university. So I liked to have some syntax highlighting for my favorite editor: gEdit. The following steps were tested on Ubuntu 10.04.4 LTS. This adds MIPS syntax highlighting to gEdit and every editor, that uses gtksourceview. Create the following file: /usr/share/gtksourceview-2.0/language-specs/sal.lang Source: GITHub: [...]

C Puzzle #1

Assembly Code - Thumbnail

What is the output of the following programm? Short Answer It depends on your compiler flags! If you compile it with no optimization, you might get 43: If you compile it with 03 Optimization, you might get 5. Long answer The general answer Lets analyse this code line by line. Line 3 – 7 is [...]

Get your programs assembly code and more information

Assembly Code - Thumbnail

I’ve talked today with a fellow student about some system internals and we weren’t sure what actually happens. So I needed the assembly code of some example programs. General Information It is important to know that I will use AT&T syntax in this article! This is AT&T Syntax: And this is Intel Syntax: Pointers %esp: [...]