Draw an ASCII-art rainbow Draw an ASCII-art rainbow!
Input
An integer between 0 and 1000, inclusive.
Examples
Input 0:

/\
||

Input 1:
 _
/ \
| |

Input 2:
 __
/  \
|  |

Input 3:
 ___
/   \
|   |

The first row is a space followed by n underscores.
The second row is a slash followed by n spaces, and a backslash.
The third row is a pipe followed by n spaces, and a pipe.
Trailing spaces are allowed.
This is code-golf. Shortest code wins.
i386 (16-bit mode) Bootsector, 512 bytes
All i386 bootsectors have to be 512 bytes, so... Without the padding required by i386, it is 137 bytes. Since I can't easily post a TIO link, here's a screenshot of it running:

This code registers the BIOS interrupt int 0x69 to take the number in the bx register and use it as input. Thus, doing
mov bx, 3
int 0x69

is equivalent to the last test case. The disassembled, Intel-syntax source is:
[org 0x7c00]

xor ax, ax
mov es, ax
cli
mov dx, interrupt
mov [es:0x69*4], dx
mov ax, cs
mov [es:0x69*4+2], ax
sti

xor bx, bx
int 0x69
call newline
mov bx, 1
int 0x69
call newline
mov bx, 2
int 0x69
call newline
mov bx, 3
int 0x69
cli
hlt

interrupt:
or bx, bx
jz special
push bx
mov ax, 0x0e20
int 0x10
mov al, '_'
.loop1:
int 0x10
dec bx
jnz .loop1
call newline
mov al, '/'
int 0x10
mov al, ' '
pop bx
push bx
.loop2:
int 0x10
dec bx
jnz .loop2
mov al, '\'
int 0x10
call newline
mov al, '|'
int 0x10
pop bx
mov al, ' '
.loop3:
int 0x10
dec bx
jnz .loop3
mov al, '|'
int 0x10
iret

newline:
mov ax, 0x0e0d
int 0x10
mov al, 0x0a
int 0x10
ret

special:
mov si, s
mov ah, 0x0e
.sloop:
lodsb
int 0x10
or al, al
jnz .sloop
iret

s: db '/', '\', 10, 13, '|', '|'

times 510-($-$$) db 0
dw 0xaa55

(Bit verbose, I know, but hey, it's assembly.)