]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/boot/i386/btx/btx/btx.m4
unfinished sblive driver, playback/mixer only for now - not enabled in
[FreeBSD/FreeBSD.git] / sys / boot / i386 / btx / btx / btx.m4
1 #
2 # Copyright (c) 1998 Robert Nordier
3 # All rights reserved.
4 #
5 # Redistribution and use in source and binary forms are freely
6 # permitted provided that the above copyright notice and this
7 # paragraph and the following disclaimer are duplicated in all
8 # such forms.
9 #
10 # This software is provided "AS IS" and without any express or
11 # implied warranties, including, without limitation, the implied
12 # warranties of merchantability and fitness for a particular
13 # purpose.
14 #
15
16 # $FreeBSD$
17
18 define(_al,0x0)dnl
19 define(_cl,0x1)dnl
20 define(_dl,0x2)dnl
21 define(_bl,0x3)dnl
22 define(_ah,0x4)dnl
23 define(_ch,0x5)dnl
24 define(_dh,0x6)dnl
25 define(_bh,0x7)dnl
26
27 define(_ax,0x0)dnl
28 define(_cx,0x1)dnl
29 define(_dx,0x2)dnl
30 define(_bx,0x3)dnl
31 define(_sp,0x4)dnl
32 define(_bp,0x5)dnl
33 define(_si,0x6)dnl
34 define(_di,0x7)dnl
35
36 define(_bx_si,0x0)dnl
37 define(_bx_di,0x1)dnl
38 define(_bp_si,0x2)dnl
39 define(_bp_di,0x3)dnl
40 define(_si_,0x4)dnl
41 define(_di_,0x5)dnl
42 define(_bp_,0x6)dnl
43 define(_bx_,0x7)dnl
44
45 define(o16,`.byte 0x66')dnl
46
47 define(addwia,`.byte 0x5; .word $1')dnl
48 define(lgdtwm,`.byte 0xf; .byte 0x1; .byte 0x16; .word $1')dnl
49 define(lidtwm,`.byte 0xf; .byte 0x1; .byte 0x1e; .word $1')dnl
50 define(cmpwmr,`.byte 0x3b; .byte ($2 << 0x3) | 0x6; .word $1')dnl
51 define(cmpwir,`.byte 0x81; .byte 0xf8 | $2; .word $1')dnl
52 define(movbr1,`.byte 0x88; .byte 0x40 | ($1 << 0x3) | $3; .byte $2')dnl
53 define(movwr0,`.byte 0x89; .byte ($1 << 0x3) | $2')dnl
54 define(leaw1r,`.byte 0x8d; .byte 0x40 | ($3 << 0x3) | $2; .byte $1')dnl
55 define(movwir,`.byte 0xb8 | $2; .word $1')dnl
56 define(movbi1,`.byte 0xc6; .byte 0x40 | $3; .byte $2; .byte $1')dnl
57 define(callwi,`.byte 0xe8; .word $1 - . - 0x2')dnl
58 define(jmpfwi,`.byte 0xea; .word $2; .word $1')dnl
59 define(tstbim,`.byte 0xf6; .byte 0x6; .word $2; .byte $1')dnl