Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Killer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Vytor Calixto
Killer
Commits
7fc1691f
Commit
7fc1691f
authored
10 years ago
by
Vytor Calixto
Browse files
Options
Downloads
Patches
Plain Diff
Transmission done (?) in handlerUART.s
parent
05b7ee74
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
cMIPS/tests/handlerUART.s
+33
-3
33 additions, 3 deletions
cMIPS/tests/handlerUART.s
with
33 additions
and
3 deletions
cMIPS/tests/handlerUART.s
+
33
−
3
View file @
7fc1691f
...
...
@@ -31,7 +31,37 @@ TX:
andi
$a0
,
$k1
,
UART_tx_irq
#
Is
this
transmission
?
beq
$a0
,
$zero
,
END
#
no
,
end
handler
nop
#
TODO
:
Increment
ntx
(
we
're sending a char)
lui
$a0
,
%
hi
(
ntx
)
ori
$a0
,
$a0
,
%
lo
(
ntx
)
lw
$a1
,
0
(
$a0
)
#
Read
ntx
li
$a0
,
16
slt
$a0
,
$a1
,
$a0
#
If
ntx
<
16
there
's something on the queue
beq
$a0
,
$zero
,
END
nop
lui
$a0
,
%
hi
(
tx_queue
)
ori
$a0
,
$a0
,
%
lo
(
tx_queue
)
lw
$a1
,
0
(
$a0
)
#
Read
TX_queue
lui
$a0
,
%
hi
(
HW_uart_addr
)
ori
$a0
,
$a0
,
%
lo
(
HW_uart_addr
)
sw
$a1
,
0
(
$a0
)
#
Put
data
on
UART
lui
$a0
,
%
hi
(
tx_hd
)
ori
$a0
,
$a0
,
%
lo
(
tx_hd
)
lw
$a1
,
0
(
$a0
)
#
Read
tx_hd
nop
addiu
$a1
,
$a1
,
1
#
Increment
tx_hd
:
we
've transmitted, there'
s
space
on
the
queue
sw
$a1
,
0
(
$a0
)
#
Save
tx_hd
lui
$a0
,
%
hi
(
ntx
)
ori
$a0
,
$a0
,
%
lo
(
ntx
)
lw
$a1
,
0
(
$a0
)
#
Read
ntx
nop
addiu
$a1
,
$a1
,
1
#
Increment
ntx
sw
$a1
,
0
(
$a0
)
#
Save
incremented
ntx
END
:
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