-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhostname.inc
More file actions
30 lines (29 loc) · 745 Bytes
/
hostname.inc
File metadata and controls
30 lines (29 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
_user_code _hostname
xor eax, eax
mov al, _SYSCALL_ARGCPY
int 030H
cmp dword [_USER_SHELL_ARGUMENT_VIRTUAL], 0H
jz _hostname_start
xor eax, eax
mov al, _SYSCALL_WRITE
mov ebx, _TELETYPE_CURRENT
mov ecx, _hostname_invalid
mov edx, _hostname_invalid.sizeof
int 030H
mov ebx, (not 0H)
jmp _hostname_start_exit
_hostname_start:
xor eax, eax
mov al, _SYSCALL_WRITE
mov ebx, _TELETYPE_CURRENT
mov ecx, _hostname_value
mov edx, _hostname_value.sizeof
int 030H
xor ebx, ebx
_hostname_start_exit:
xor eax, eax
mov al, _SYSCALL_EXIT
int 030H
_hostname_value string "CP/M2 Workstation", 00AH
_hostname_invalid string "hostname invalid usage", 00AH
end _user_code