;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;	TITLE:		bs3cnf120.inc
;
;	ABSTRACT:	Macro definition for third stage configuration
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
dgroup    group   data
cgroup    group   code
assume    cs:cgroup
code      segment para public 'code'
extrn     bs3:near
extrn     cpyrt:near
;
;	do something with the copyright to pull it in.
	dw	cpyrt

code      ends


%*DEFINE(serial_channel(channel_no, b_rate))(%'
data	segment public 'DATA'
user_channel dw	%channel_no
PUBLIC user_channel
data	ends
%DEFINE(baud)(%b_rate)
%'	'%IF (%EQS(%b_rate,9600)) THEN (
%'		'data  segment public 'DATA'
%'      'baud_rate db 7
%'      'PUBLIC baud_rate
%'      'data ends
%'	')%'
%'	'ELSE (%IF (%EQS(%b_rate,4800)) THEN (
%'		'data  segment public 'DATA'
%'      'baud_rate db 6
%'      'PUBLIC baud_rate
%'      'data ends
%'	')%'
%'	'ELSE (%IF (%EQS(%b_rate,2400)) THEN (
%'		'data  segment public 'DATA'
%'      'baud_rate db 5
%'      'PUBLIC baud_rate
%'      'data ends
%'	')%'
%'	'ELSE (%IF (%EQS(%b_rate,1200)) THEN (
%'		'data  segment public 'DATA'
%'      'baud_rate db 4
%'      'PUBLIC baud_rate
%'      'data ends
%'	')%'
%'	'ELSE (%IF (%EQS(%b_rate,600)) THEN (
%'		'data  segment public 'DATA'
%'      'baud_rate db 3
%'      'PUBLIC baud_rate
%'      'data ends
%'	')%'
%'	'ELSE (%IF (%EQS(%b_rate,300)) THEN (
%'		'data  segment public 'DATA'
%'      'baud_rate db 2
%'      'PUBLIC baud_rate
%'      'data ends
%'	')%'
%'	'ELSE (%IF (%EQS(%b_rate,150)) THEN (
%'		'data  segment public 'DATA'
%'      'baud_rate db 1
%'      'PUBLIC baud_rate
%'      'data ends
%'	')%'
%'	'ELSE (
%'		'data  segment public 'DATA'
%'      'baud_rate db 0
%'      'PUBLIC baud_rate
%'      'data ends
%'	') FI %'
%'	') FI %'
%'	') FI %'
%'	') FI %'
%'	') FI %'
%'	') FI %'
%'	') FI %'
)
%*DEFINE(default(condition))(
%'	'%IF (%EQS(%condition,yes)) THEN (
data segment PUBLIC 'DATA'
user_interface db 0
PUBLIC user_interface
data ends
%'  ')%'
%'  'ELSE ( 
data segment PUBLIC 'DATA'
user_interface db 0FFH
PUBLIC user_interface
data ends
%'  ') FI
)
;
%*DEFINE(sdm(init_cond))(
%'	'%IF (%EQS(%init_cond,yes)) THEN (
data segment PUBLIC 'DATA'
sdm db 0FFH
PUBLIC sdm
data ends
%'  ')%'
%'  'ELSE ( 
data segment PUBLIC 'DATA'
sdm db 0H
PUBLIC sdm
data ends
%'  ') FI
)
%*DEFINE(delay(delay_factor))(
data segment PUBLIC 'DATA'
delay dw %delay_factor
PUBLIC delay
data ends
)
;
%*DEFINE (end)(
data      segment
dw	0,0,0,0
data      ends
code	segment
			public	dmon_config_table
			public	sdm_restart_base
			public	sdm_code_base
dmon_config_table	dw	00H, 040H		; 0400H
sdm_restart_base	dw	%restart_base_lo, %restart_base_hi
sdm_code_base		dw	%code_base_lo, %code_base_hi

code	ends
end)
;
;
%'		'%SET(restart_base_hi, 0000EH)
%'		'%SET(restart_base_lo, 0FF80H)
%'		'%SET(code_base_hi, 0000EH)
%'		'%SET(code_base_lo, 08240H)
%'
%'		'code     segment
%'		'public   init_board
%'		'init_board proc near
		mov	al, 0e3h
		out	64h, al
		ret

%'		'init_board  endp
%'
%'		'public   set_mem
%'		'set_mem proc near
%'		'ret
%'		'set_mem  endp
%'		'code	ends


;
%*DEFINE  (installation(y_or_n))(
%IF ((%EQS(%y_or_n,y)) OR (%EQS(%y_or_n,Y))) THEN (
;
code     segment
;
message	db 'Insert the '
	db 'System 120 '
	db 'Start-up Commands disk and type: g<RETURN>',0dh,0ah,0

public	installation
extrn	putstring: near

;
installation proc near

	lea	bx, message
	push	cs
	push	bx
	call	putstring 

	int 3

ret

installation  endp
;
code	ends
)
ELSE (
;
code     segment
;
public	installation
;
installation proc near
;  Nothing to do
ret
installation  endp
;
code	ends
) FI )
