Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
labo
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
ISC2
pro
labo
Commits
2c0dbca5
Commit
2c0dbca5
authored
1 year ago
by
iliya
Browse files
Options
Downloads
Patches
Plain Diff
fix: ex2 working, ex3 next
parent
a4b64ecf
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
2-2_asm/src/assembleur.s
+29
-8
29 additions, 8 deletions
2-2_asm/src/assembleur.s
2-2_asm/src/labo2.2_asm.c
+1
-1
1 addition, 1 deletion
2-2_asm/src/labo2.2_asm.c
with
30 additions
and
9 deletions
2-2_asm/src/assembleur.s
+
29
−
8
View file @
2c0dbca5
...
...
@@ -42,20 +42,21 @@ add_err:
.
thumb_func
funcexo2
:
//
r3
index
for
loop
mov
r3
,
#
0
mov
r3
,
#
1
cmp
r3
,
r2
blt
funcexo2_for_loop
mov
r0
,
#
1
bx
lr
funcexo2_for_loop
:
add
r3
,
#
1
ldr
r4
,
[
r0
],
#
4
adds
r5
,
r4
,
r4
adds
r4
,
r4
bhs
err
str
r
1
,
[
r
5
],
#
4
str
r
4
,
[
r
1
],
#
4
cmp
r3
,
r2
blt
funcexo2_for_loop
blo
funcexo2_for_loop
mov
r0
,
#
1
bx
lr
err
:
mov
r0
,
#
0
...
...
@@ -63,13 +64,33 @@ err:
.
thumb_func
majuscule
:
//
index
while
loop
mov
r1
,
#
0
debut_while
:
ldr
r2
,
[
r0
],
#
1
cmp
r2
,
#
0
bne
funcexo3_while_loop
bx
lr
funcexo3_while_loop
:
cmp
r2
,
#
97
bge
second_cond
bx
lr
second_cond
:
cmp
r2
,
#
122
ble
if_cond
bx
lr
if_cond
:
sub
r2
,
#
32
str
r2
,
[
r0
,
r1
]
add
r1
,
#
1
b
debut_while
//.
weak
add_sat
.
ltorg
This diff is collapsed.
Click to expand it.
2-2_asm/src/labo2.2_asm.c
+
1
−
1
View file @
2c0dbca5
...
...
@@ -25,7 +25,7 @@ uint32_t funcexo2(uint32_t *, uint32_t *, uint32_t);
void
majuscule
(
char
*
s
);
/* global variables */
int
exo
=
2
;
// change this number with the exercise number you want to test;
int
exo
=
3
;
// change this number with the exercise number you want to test;
int
main
(
void
)
{
...
...
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