Dokumen tersebut membahas tentang arsitektur dan organisasi komputer. Secara ringkas, dibahas mengenai perbedaan antara arsitektur dan organisasi komputer, komponen-komponen utama sistem komputer seperti processor, memori, dan modul I/O, serta struktur dan fungsi dari masing-masing komponen tersebut dalam sistem komputer.
Dokumen tersebut membahas tentang tuning performance database. Secara umum dibahas mengenai pengertian tuning performance, langkah-langkah memulai tuning, prinsip dan kriteria tuning, teknik-teknik tuning seperti partitioning, indexing, denormalisasi, dan masalah yang menyebabkan performance menurun seperti scan tabel yang tidak efisien.
Este documento resume los diferentes puertos y conectores de una computadora, incluyendo conectores de alimentación, ventiladores, puertos PS/2 para teclado y mouse, puertos USB, puertos seriales y paralelos, puertos VGA, Ethernet, micrófono, audio y MIDI. Explica brevemente el propósito y características de cada puerto.
Popular Maple codes - By Amir Shokri
Email : amirsh.nll@gmail.com
Blog :www.ashokri.com
Updated Time : 09/21/2020
Language : Persian(Farsi)
هرگونه کپی برداری و استفاده ی تجاری از این فایل غیر مجاز می باشد و این فایل به صورت کاملا رایگان منتشر شده است؛ در صورتی که این نسخه به صورت غیر رایگان در جایی ارائه شده است از طریق ایمیل به من اطلاع دهید.
Dokumen tersebut membahas tentang arsitektur dan organisasi komputer. Secara ringkas, dibahas mengenai perbedaan antara arsitektur dan organisasi komputer, komponen-komponen utama sistem komputer seperti processor, memori, dan modul I/O, serta struktur dan fungsi dari masing-masing komponen tersebut dalam sistem komputer.
Dokumen tersebut membahas tentang tuning performance database. Secara umum dibahas mengenai pengertian tuning performance, langkah-langkah memulai tuning, prinsip dan kriteria tuning, teknik-teknik tuning seperti partitioning, indexing, denormalisasi, dan masalah yang menyebabkan performance menurun seperti scan tabel yang tidak efisien.
Este documento resume los diferentes puertos y conectores de una computadora, incluyendo conectores de alimentación, ventiladores, puertos PS/2 para teclado y mouse, puertos USB, puertos seriales y paralelos, puertos VGA, Ethernet, micrófono, audio y MIDI. Explica brevemente el propósito y características de cada puerto.
Popular Maple codes - By Amir Shokri
Email : amirsh.nll@gmail.com
Blog :www.ashokri.com
Updated Time : 09/21/2020
Language : Persian(Farsi)
هرگونه کپی برداری و استفاده ی تجاری از این فایل غیر مجاز می باشد و این فایل به صورت کاملا رایگان منتشر شده است؛ در صورتی که این نسخه به صورت غیر رایگان در جایی ارائه شده است از طریق ایمیل به من اطلاع دهید.
this is a lesson about how to program with c and programming tips.
Base of the programming in the university's of iran.
If you want the Powerpoint of this slides tell with me on my phone or email.
best regards
moein jazemi
phone +989112306438
email moeinjazemia@gmail.com
this is a lesson about how to program with c and programming tips.
Base of the programming in the university's of iran.
If you want the Powerpoint of this slides tell with me on my phone or email.
best regards
moein jazemi
phone +989112306438
email moeinjazemia@gmail.com
6. می کنید فرض ،دیگر کاربردی مثال یک عنوان به
حلقه یک کد خواهیم
for
زبان به
C
اسمبلی زبان معادل به را
معماری با منطبق
MIPS
:کنیم تبدیل
// Mohammad Kadkhodaei
// Loop in C
int iterations = 10;
int i = 0;
int val = 17;
for(i = 0; i < 10; i++)
{
val += i;
}
حلقه تبدیل برای
for
دستورات به
beq
و
loop
اساس همین بر ،داشت خواهیم نیاز
اسمب کد به حاصل برنامه
ل
ی
بود خواهد زیر صورت به
:
.text
.globl main
main:
li $t0, 10 #
li $t1, 0 #
li $t2, 17 #
loop:
beq $t1, $t0, end
add $t2, $t2, $t1
addi $t1,$t1, 1
j loop
end:
li $v0,10
syscall
باشد زیر مشابه چیزی باید خروجی مقدار فوق کد اجرای از پس
:
17+0+1+2+3+4+5+6+7+8+9 = 62
برنامه در
QtSpim
تصویر مطابق اجرا از پس
5
رجیستر محتوای ،
t1
مقدار
9
رجیستر و
t2
مقدار
3e
همان یا
62
.داشت خواهد را
تصو
ی
ر
5
رجیسترها محتوای :
7. آموزش ادامه در
می نظر در را مثالی ،
دریافت کاربر از کنسول طریق از را مقدار دو داریم قصد آن در که گیریم
رجیسترهای در مقادیر این ،کنیم
t0
و
t1
کمک به را مقدار دو این سپس .گرفت خواهند قرار
add
می جمع
کنیم
در را حاصل و
a0
می قرار
می نتیجه چاپ به اقدام سپس و دهیم
کنیم
:
.data
prompt1: .asciiz "nn Enter the first integer please:"
prompt2: .asciiz "Enter the second integer please:"
result: .asciiz "The result is:"
.text
main:
#t0-to hold first integer
#t1-to hold second integer
#t2- used to hold the sum of t$1 and t$2
#first number
li $v0, 4 #syscall to print string
la $a0, prompt1 #address of string to print
syscall
li $v0, 5 #syscall to read an integer
syscall
move $t0, $v0 #move the number to $t0
#second number
li $v0, 4
la $a0, prompt2
syscall
li $v0,5
syscall
move $t1,$v0
#
#print out sum of $t2
li $v0, 4
la $a0, result
syscall
#
add $a0, $t1, $t0 #compute the sum
li $v0, 1
syscall
#
li $v0, 10
syscall
9. می ارائه ادامه در فاکتوریل محاسبه اسمبلی کد
شود
:
.globl main
.data
# main program string constants
#
prompt: .asciiz "Please enter a positive integer: "
result: .asciiz "! = "
newline: .asciiz "n"
done: .asciiz "Program terminated."
.text
# main program
#
# Register usage:
#
# n: $s0
# factorial: $s1
#
main:
li $v0, 4 # issue prompt
la $a0, prompt
syscall
la $v0, 5 # get n from user
syscall
move $s0, $v0
bltz $v0, end # terminate if n < 0
move $a0, $s0 # nFact = factorial(n)
jal factorial
move $s1, $v0
li $v0, 1 # print n
move $a0, $s0
syscall
li $v0, 4 # print "! = "
la $a0, result
syscall
li $v0, 1 # print nFact
move $a0, $s1
syscall
li $v0, 4 # print two newlines
la $a0, newline
syscall
li $v0, 4
la $a0, newline
syscall
10. b main # repeat with new n
end:
li $v0, 4 # print a termination message
la $a0, done
syscall
li $v0, 4 # print a newline
la $a0, newline
syscall
li $v0, 10 # terminate the program
syscall
# function factorial
factorial:
bgtz $a0, recur # recur if n > 0
li $v0, 1 # else just return 1
jr $ra
recur:
sub $sp, $sp, 8 # allocate stack frame
sw $ra, 0($sp) # with return address at 0($sp)
sw $a0, 4($sp) # and n at 4($sp)
sub $a0, $a0, 1 # $v0 = factorial(n - 1)
jal factorial
lw $ra, 0($sp) # restore return address
lw $a0, 4($sp) # and n from the stack frame
add $sp, $sp, 8 # and deallocate it
mul $v0, $v0, $a0 # return factorial(n - 1)*n
jr $ra
11. پیاده ،مثال آخرین عنوان به
یا رویه یک سازی
ز
ی
ر
روال
ر
می ارائه اسمبلی زبان در ا
برنامه در ،کنیم
زیرروال ،نویسی
دنباله به ،رویه یا
دستورالعمل از ای
ی صورت به که گویند ها
ک
بسته واحد
یک برای را خاص کار یک شده بندی
نرم
می انجام افزار
باشد الزم جا هر آینده کاربردهای در واحد این .دهد
ًااصطالح
یا فراخوانی
call
می
.شود
.data
msg: .asciiz "Hello!n"
nl: .asciiz "n"
bang: .asciiz "!n"
name_1: .asciiz "Nina"
name_2: .asciiz "Mike"
hi: .asciiz "Hi "
.text
main:
jal hello
li $t0, 0x1234abcd
jal hello
# Compute the sum of 1, 2 and 3.
li $a0, 1
li $a1, 2
li $a2, 3
jal compute
# Result now in $v0.
# Print result.
# Copy result to $a0.
move $a0, $v0
li $v0, 1 # Systemcall code print_int
syscall # Print value in $a0.
# Print new line.
li $v0, 4 # Systemcall code print_str
la $a0, nl
syscall
12. la $a0, name_1
jal say_hi
la $a0, name_2
jal say_hi
li $v0, 10 # System call code 10 (exit).
syscall
# ---------------------------------------------------------------------------
# Subroutine hello
#
# Prints the string "Hello!n"
# ---------------------------------------------------------------------------
hello:
li $v0, 4 # Systemcall code print_str
la $a0, msg
syscall
# Return from subroutine hello.
# Use jr (Jump Register) to jump to the address saved by jal in $ra.
jr $ra
# ---------------------------------------------------------------------------
# Subroutine compute
#
# Argument(s): Three numbers in $a0, $a1 and $a2.
#
# Return value in $v0: The sum of $a0, $a1 and $a2.
# ---------------------------------------------------------------------------
compute:
add $t0, $a0, $a1
add $v0, $t0, $a2
jr $ra
# ---------------------------------------------------------------------------
# Subroutine say_hi
# ---------------------------------------------------------------------------
say_hi:
move $t0, $a0
li $v0, 4 # Systemcall code print_str
la $a0, hi
syscall
move $a0, $t0
syscall
la $a0, bang
syscall
jr $ra