Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
os_worksheet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
k26-chow
os_worksheet
Commits
9a30bd5b
Commit
9a30bd5b
authored
5 months ago
by
k26-chow
Browse files
Options
Downloads
Patches
Plain Diff
Delete task1.asm
parent
e83ed15f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
task1.asm
+0
-31
0 additions, 31 deletions
task1.asm
with
0 additions
and
31 deletions
task1.asm
deleted
100644 → 0
+
0
−
31
View file @
e83ed15f
int
__attribute__
((
cdecl
))
asm_main
(
void
)
;
int
main
()
{
int
ret_status
;
ret_status
=
asm_main
()
;
return
ret_status
;
}
nasm
-
f
elf
task1.asm
-
o
task1.o
nasm
-
f
elf
asm_io.asm
-
o
asm_io.o
gcc
-
m32
-
c
driver.c
-
o
driver.o
gcc
-
m32
driver.o
task1.o
asm_io.o
-
o
task1
%include “asm_io.inc”
seg
ment
.data
integer1
dd
15
; first int
integer2
dd
6
; second int
seg
ment
.bss
result
resd
1
; result
seg
ment
.text
global
asm_main
asm_main:
pusha
mov
eax
,
[
integer1
]
; eax = int1
add
eax
,
[
integer2
]
; eax = int1 + int2
mov
[
result
],
eax
; result = int1 + int2
call
print_int
; print result
popa
mov
eax
,
0
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment