Before visiting this forum I had never heard of Assembly programming. Does anybody know of any applications written in assembly? If anyone does I would like to check them out to help me understand what assembly was used for.
Assembly Applications
Started by skilletsteve, Aug 11 2006 09:40 AM
8 replies to this topic
#1
Posted 11 August 2006 - 09:40 AM
|
|
|
#2
Posted 11 August 2006 - 02:45 PM
Good question. I don't know of any applications that are actually wrote in assembly. I'd like to see some as well.
#3
Posted 14 August 2006 - 02:42 AM
I have a few, one calculates the quadratic equation, I'll try to find the code for you
<!-- comment comment comment --></
#4
Posted 21 August 2006 - 12:47 PM
I wrote a program on my calcluator that did the quadratic equation, but I'd bet $3,000,000 that the assembly version is more complicated.
#5
Posted 22 August 2006 - 12:58 AM
Well if im not wrong Delphi ( or some other language ) supports inline Assembly!
#6
Posted 24 August 2006 - 03:56 PM
interesting, how do you add assembly to delphi?
#7
Posted 24 August 2006 - 08:22 PM
This is a program I wrote a couple years ago. It is written in MIPS assembly language
#
# mktab.s: evaluate arithmetic expressions using the first
# 12 natural numbers
#
#
#$s0: counter
#$s1: the final value is passed to this for each problem
#$s2: used as a "counter" in the Fn problem
#$s3: used as a "counter" in the Fn problem
#$s4: used as a "counter" in the n! problem
#
.data
print_int = 1
print_str = 4
Fn_1 = 1
FINAL = 12 #the last number
first_line: .asciiz "******************************\n"
second_line: .asciiz "Welcome to the 'mktab' program\n"
space_char: .asciiz " "
newline: .asciiz "\n"
labels: .asciiz "n n2 n3 Fn n!\n"
first_fib: .word 1
second_fib: .word 1
#
#
# ***main***
# ====
#
.text
main:
move $s0,$0 #counter = 0
move $s2,$0 #initializes as zero
move $s3,$0
add $s3,$s3,1 #initializes as one
move $s5,$s3
# --Display the Greeting--
la $a0, first_line
li $v0, print_str
syscall
la $a0, second_line
li $v0, print_str
syscall
la $a0, first_line
li $v0, print_str
syscall
la $a0, labels
li $v0, print_str
syscall
#^L
MAIN_LOOP:
# -- display n --
move $a0,$s0
li $v0,print_int
syscall
la $a0, space_char #adds a space
li $v0, print_str
syscall
# -- display n2 --
mul $s1,$s0,$s0
move $a0,$s1
li $v0,print_int
syscall
la $a0, space_char #adds a space
li $v0, print_str
syscall
# -- display n3 --
mul $s1,$s1,$s0
move $a0,$s1
li $v0,print_int
syscall
la $a0, space_char #adds a space
li $v0, print_str
syscall
# -- display Fn --
move $s4,$s3
add $s3,$s2,$s3
move $a0,$s3
li $v0,print_int
syscall
move $s2,$s4
la $a0, space_char #adds a space
li $v0, print_str
syscall
# -- display n! --
mul $s5,$s0,$s5
bnez $s0,NOT_E
add $s5,$s5,1
NOT_E: move $a0,$s5
li $v0,print_int
syscall
la $a0, newline #adds a newline
li $v0, print_str
syscall
add $s0,$s0,1 #increment counter
bne $s0,FINAL,MAIN_LOOP #loops if not done
jr $ra #return to OS
<!-- comment comment comment --></
#8
Posted 25 August 2006 - 04:57 AM
Well I dont use delphi but I saw that on a site! but cant find it! but you just write
thats all! look ata this site! http://www.alstonlabs.com/assembly.htm
asm [I]Assembly code here[/I] end;
thats all! look ata this site! http://www.alstonlabs.com/assembly.htm
#9
Posted 25 August 2006 - 03:32 PM
C and C++ also support inline assembly. Many C/C++ libraries use assembly at to perform low-level system-specific tasks.


Sign In
Create Account


Back to top









