Skip to content

Commit 5c8cf4f

Browse files
author
Ian Seyler
committed
Display multiple MACs if present
1 parent 4f5bcfd commit 5c8cf4f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/monitor.asm

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,13 @@ skip_ramdrive:
8585
; Output MAC address
8686
mov rsi, networkmsg
8787
call ui_output
88+
xor edx, edx
89+
90+
dispmac:
8891
mov rcx, MAC_GET
8992
call [b_system]
93+
cmp eax, 0
94+
je MACdone
9095
ror rax, 40
9196
mov ecx, 5 ; Display the first 5 with separators after
9297
nextMAC:
@@ -98,6 +103,15 @@ nextMAC:
98103
test ecx, ecx
99104
jnz nextMAC
100105
call dump_al ; Display the last
106+
inc edx
107+
mov rcx, MAC_GET
108+
call [b_system]
109+
cmp eax, 0
110+
je MACdone
111+
mov rsi, networkmacsep
112+
call ui_output
113+
jmp dispmac
114+
MACdone:
101115
mov rsi, closebracketmsg
102116
call ui_output
103117

@@ -1239,6 +1253,7 @@ command_shutdown: db 'shutdown', 0
12391253
cpumsg: db '[cpu: ', 0
12401254
memmsg: db '] [mem: ', 0
12411255
networkmsg: db '] [net: ', 0
1256+
networkmacsep: db ', ', 0
12421257
diskmsg: db '] [hdd: ', 0
12431258
mibmsg: db ' MiB free', 0
12441259
mhzmsg: db ' MHz', 0

0 commit comments

Comments
 (0)