CMPT-101 Lecture Notes - Lecture 16: Data Segment, Pseudocode

184 views2 pages

Document Summary

#this will check to see if count is greater than 1. If it is, it will subtract 1 from and print the count. #this will output the larger of the two numbers, a and b. Name every branch to associate them with your program. #will help in pseudocode to help understand how the program works. #real code, but just a way to understand how a program works. The data segment contains all constant and variable definitions. The main segment contains the program itself. hello: #this sets up the argument to print string. #tells the os to do the above syscall. #tells the os to do the exit syscall. #notice a couple things from the above program. For example, the use of syscall as an executable. Also notice the numbers 4 and 10 each represents a syscall service. #one more thing is the this is the register, or store space.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions