Write an assembly program & Machine code that:

Load AL by an arbitrary number, if there is parity even, transfer 80H to the Port 0, and if there is parity odd, transfer 01H to the Port 0.

Assembly Program:

```
; Load AL with an arbitrary number
MOV AL, 10101010b

; Check if there is parity even
MOV AH, AL
AND AH, 01h
PUSHF
SHR AH, 1
AND AH, 01h
XOR AL, AH
POPF
JPE even

; If parity odd, transfer 01H to Port 0
MOV AL, 01h
MOV DX, 00h
OUT DX, AL
JMP end

even:
; If parity even, transfer 80H to Port 0
MOV AL, 80h
MOV DX, 00h
OUT DX, AL

end:
HLT
```

Machine Code:

```
B0 AA 9A E4 01 00 50 D2 E0 24 C0 02 C4 80 E0 EB 05 B0 01 B4 00 EE EB F6 B0 80 B4 00 EE F4
```

Sure! Here's an example of an x86 assembly program that loads a number into AL, checks its parity, and transfers a specific value to Port 0 based on the result:

```assembly
; Initialize the data segment
[org 0x0100]

section .data
number db 0x2A ; Arbitrary number to load into AL
port0 db 0 ; Variable to store the value to be transferred to Port 0

section .text
global _start
_start:
; Load the number into AL
mov al, [number]

; Check the parity
xor ah, ah ; Clear the high bits of AX
mov bl, al ; Copy AL to BL

; Loop through the bits
check_parity:
shr bl, 1 ; Shift right (dividing by 2)
jnc no_parity ; Jump if no carry (bit 0 was 0)
inc ah ; Increment AH if carry (bit 0 was 1)
jmp check_parity ; Continue looping

; Determine the value to transfer
no_parity:
test ah, 1 ; Check the parity (bit 0 of AH)
jz even_parity ; Jump if zero (even parity)
mov byte [port0], 0x01 ; Store 01H to port0 (odd parity)
jmp continue

even_parity:
mov byte [port0], 0x80 ; Store 80H to port0 (even parity)

continue:
; Transfer the value to Port 0 (OUT instruction)
mov dx, 0x0000 ; Port 0 address
mov al, byte [port0] ; Load the value to AL
out dx, al ; Transfer AL to Port 0

; Terminate the program
mov ah, 0x4C
int 0x21
```

The corresponding machine code for this assembly program would be:

```assembly
B8 2A 00
30 E4
88 C3
D2 E5
70 01
FE C4
EC F5
A8 01
EB 06
C6 06 00 80
EB 02
C6 06 00 01
BA 00 00
8A 04 06
EE
B4 4C
CD 21
```

Please note that the machine code may slightly vary depending on the assembler or the machine architecture being used.