Here is an example to build a simple 320x200 screen on Enterprise:
macro exos n
rst 030h
defb n
endm
org 00f0h
db 00,05
dw fillen
db 00,00,00,00,00,00,00,00,00,00,00,00
startpr ld sp,0100h
ld hl,error ;store error and soft reset routine
ld (0bff8h),hl
ld bc,011bh
ld d,00h
exos 16 ;set border to 0 via EXOS
call vid ;get a video segment
out (0b3h),a ;page into page 3
call memaddr ;get Nick address of the video segment
ld (vlpb+04h),hl ;store Nick address of video memory to the LPT
ld a,h
ld hl,vlpb ;copy LPT into video memory (now it's z80 address is 0ff00h)
ld de,0ff00h
ld bc,0070h
ldir
or 3fh ;this part activate copied LPT, 1st calculate value for port (83h,82h)
rrca ;Address of LPT/16 or 0c000h is written to ports 83h,82h
rrca
rrca
rrca
or 0c0h
ld c,a
ld a,0f0h
out (82h),a ;low value of LPT/16 or 0c000h
ld a,c
out (83h),a ;high value of LPT/16 or 0c000h
;after this 2 port writes Nick starts to display the new screen, which is a 320x200 screen with 16 colours and it can be used 0c000h-0fe7fh
;by changing VLPB+1 you can change colours: 0f2h 256 colour, 0d2h 16 colour, 0b2h 4 colour, 92h 2 colour mode
vid ld hl,endprg ;request a Video RAM from EXOS
ld (hl),0
req_seg exos 24
jr z,whatsup
cp 7fh
jp nz,error
whatsup ex af,af'
ld a,c
cp 0fch
jr nc,dontask
inc hl
ld (hl),c
jr req_seg
dontask ex af,af'
push bc
push af
back ld c,(hl)
exos 25
dec hl
jr z,back
pop af
pop bc
or a
jp nz,error
ld a,c
ret
memaddr ld hl,0000h
rra
rr h
rra
rr h
ret
error di
ld sp,0100h
ld a,0ffh
out (0b2h),a
ld c,40h
exos 0
ld a,01h
out (0b3h), a
ld a,06h
jp 0c00dh
; number of lines, 100h-38h
; 0d2h: b7: video interrupt will occur after this line, b6,b5: now 16 colour, b4: if it is 0 then Nick takes graphics data from the same place for each scan line defined in this LPB, b3,b2,b1: 001 - PIXEL mode
; 0bh: left margin at 0bh
; 33h: right margin at 33h
; video address1
; video address2
; colour 1-8
vlpb db 038h,0d2h,0bh,33h,00h,00h,00,00,00h,0dfh,09h,04h,34h,3fh,00h,66h ;video lpb 200
vsync db 0d2h,02h,3fh,00h,00h,00h,00,00,00,00,00,00,00,00,00,00 ;sync 46
db 0fdh,00h,3fh,00h,00h,00h,00,00,00,00,00,00,00,00,00,00 ; 3
db 0feh,00h,06h,3fh,00h,00h,00,00,00,00,00,00,00,00,00,00 ; 2
db 0ffh,00h,3fh,20h,00h,00h,00,00,00,00,00,00,00,00,00,00 ; 1
db 0f0h,02h,06h,3fh,00h,00h,00,00,00,00,00,00,00,00,00,00 ; 16
db 0d4h,03h,3fh,00h,00h,00h,00,00,00,00,00,00,00,00,00,00 ; 44
endprg
fillen equ $-startpr