• Martin Thoma
  • Home
  • Categories
  • Tags
  • Archives
  • Support me

Recent Posts

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

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

Perfect number check The perfect number check in MIPS is quite easy to realize. Here is some pythonic Pseudocode n = input() # read a positive integer n from the user sumOfDivisors = 0 for i in range(1, n): # go from 1 to n-1 if n % i == 0: # if i is a … Read More »
How to print MIPS assembly code in LaTeX

How to print MIPS assembly code in LaTeX

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 … Read More »
Add MIPS syntax highlighting to gEdit

Add MIPS syntax highlighting to gEdit

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 … Read More »
C Puzzle #1

C Puzzle #1

What is the output of the following programm? #include int* f() { int i = 5; return &i; } void g() { int j = 42; j++; } int main() { int* x = f(); g(); printf("x = %d\n", *x); g(); printf("x = %d\n", *x); return 0; } Short Answer It depends on your compiler … Read More »
Get your programs assembly code and more information

Get your programs assembly code and more information

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 … Read More »
  • Martin Thoma - A blog about Code, the Web and Cyberculture
  • E-mail subscription
  • RSS-Feed
  • Privacy/Datenschutzerklärung
  • Impressum
  • Powered by Pelican. Theme: Elegant by Talha Mansoor