پروژه های پارسکدرز
5.77K subscribers
2 photos
1 file
513K links
آخرین پروژه های پارسکدرز را در این کانال ببینید

پارسکدرز اولین بازار کار آنلاین ایران

https://parscoders.com
Download Telegram
پروژه اسمبلی (51774))==

#assembly, #software_engineering

#پروژه_جدید 
#کدپروژه : 51774
موضوع : پروژه اسمبلی ==
برای پروژه اسمبلی درسی هیتش
2.3 Assignment 2: subroutines and I/O 
In this assignment you will write your first simple subroutine. You will also learn how to obtain 
input from the user. The scanf subroutine from the C standard library can be used to obtain 
input from users. It is discussed in paragraph 3.4.2 of the reference section. Paragraph 3.3.2 
explains how to define your own subroutines. 
Exercises: 
1. Using the skeleton file provided in the framework and the coding steps learned in assignment 
2, alter the printed message in such a way that it prints the correct assignment name (“As- 
signment 2: inout”). Create a subroutine called inout and call it from within your my main 
routine right after your message is displayed. At first, your subroutine should simply return 
immediately. Build and test your program. 
2. Add a subroutine my increment, that takes one number as an input and returns its incre- 
ment. 
3. Alter your inout subroutine in such a way that it asks the user for a number, uses the 
my increment subroutine to increment it, and prints the result on the terminal. Build and 
test your program and save it for later approval. 
Important: For this assignment, you must have your submission checked by a Teaching 
Assistant alongside Assignment 1. Only enter the submission queue when both assignments are 
fully implemented and passing all CodeGrade tests.
اینم فایلش هست :
# *****
# * Program name: inout                                                           *
# * Description :                                                                 *
# *****
#ifndef MACOS
.ifndef CODEGRADE
    .global main
    main: jmp my_main
.endif
#else
    .global _main
    _main: jmp my_main
    printf: jmp _printf
    scanf: jmp _scanf
    exit: jmp _exit
#endif
.text
# your strings here
.global my_main                         # make my_main accessible globally
.global my_increment                    # make my_increment accessible globally
my_main:
        # set up the stack frame
        call    inout                
        # clear the stack and return
inout:
        # read input and increment it using my_increment
        call    my_increment
        # output incremented number
my_increment:
        # IMPLEMENT ME


توسط خریدار: کاربر386156

اطلاعات بیشتر:
https://parscoders.com/project/388398/پروژه-اسمبلی-51774-==

t.me/ParscodersCom