repo.or.cz
/
mascara-docs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* mikeOS 16 bit and amd64 baremetal
[mascara-docs.git]
/
amd64
/
bareMetalOS-0.5.2
/
baremetal0.5.2
/
programs
/
test.asm
blob
9360e5512892285abf310983a2a004a6a1406c1a
1
[
bits
64
]
2
[
org
0x0000000000200000
]
3
%
include
"bmdev.asm"
4
5
start:
6
mov
rsi
,
corecnt
7
call
b_print_string
8
call
b_smp_numcores
9
mov
rdi
,
buffer
10
call
b_int_to_string
11
mov
rsi
,
buffer
12
call
b_print_string
13
call
b_print_newline
14
call
task
15
mov
rbx
,
14
16
17
cycle:
18
push
rbx
19
mov
rax
,
task
20
call
b_smp_enqueue
21
pop
rbx
22
dec
rbx
23
or
rbx
,
rbx
24
jnz
cycle
25
26
call
b_smp_wait
27
call
b_print_newline
28
mov
rsi
,
finmsg
29
call
b_print_string
30
ret
31
32
task:
33
call
b_print_newline
34
mov
rsi
,
corenum
35
call
b_print_string
36
37
call
b_smp_get_id
38
mov
rdi
,
buffer
39
call
b_int_to_string
40
mov
rsi
,
buffer
41
call
b_print_string
42
43
mov
rsi
,
separator
44
call
b_print_string
45
46
inc
qword
[
number
]
47
mov
rax
, [
number
]
48
mov
rdi
,
buffer
49
call
b_int_to_string
50
mov
rsi
,
buffer
51
call
b_print_string
52
53
mov
rcx
,
24
54
call
b_delay
55
56
ret
57
58
corecnt
db
"Total Available Cores:"
,
0
59
corenum
db
"Core:"
,
0
60
finmsg
db
"Finished."
,
0
61
separator
db
" "
,
0
62
number
db
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
63
buffer resb
64