| 1 | ; Redistribution and use in source and binary forms, with or without modification, are
|
|---|
| 2 | ; permitted provided that the following conditions are met:
|
|---|
| 3 | ;
|
|---|
| 4 | ; Redistributions of source code must retain the above copyright notice, this list of
|
|---|
| 5 | ; conditions and the following disclaimer.
|
|---|
| 6 | ;
|
|---|
| 7 | ; Redistributions in binary form must reproduce the above copyright notice, this list of
|
|---|
| 8 | ; conditions and the following disclaimer in the documentation and/or other materials
|
|---|
| 9 | ; provided with the distribution.
|
|---|
| 10 | ;
|
|---|
| 11 | ; The name of the author may not be used to endorse or promote products derived from this
|
|---|
| 12 | ; software without specific prior written permission.
|
|---|
| 13 | ;
|
|---|
| 14 | ; THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
|---|
| 15 | ; INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|---|
| 16 | ; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
|---|
| 17 | ; INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|---|
| 18 | ; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
|---|
| 19 | ; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|---|
| 20 | ; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|---|
| 21 | ; OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|---|
| 22 | ;
|
|---|
| 23 | ; Version: 1.1.1 Beta
|
|---|
| 24 |
|
|---|
| 25 | bits 16
|
|---|
| 26 | org 0h
|
|---|
| 27 |
|
|---|
| 28 | mov ax, 0x7C0
|
|---|
| 29 | mov ds, ax
|
|---|
| 30 |
|
|---|
| 31 | call booting
|
|---|
| 32 | xor dx,dx
|
|---|
| 33 | call working
|
|---|
| 34 | call idleloop
|
|---|
| 35 |
|
|---|
| 36 | nl:
|
|---|
| 37 | mov si, newline
|
|---|
| 38 | call message
|
|---|
| 39 | ret
|
|---|
| 40 |
|
|---|
| 41 | booting:
|
|---|
| 42 | mov si, boot
|
|---|
| 43 | call message
|
|---|
| 44 | call nl
|
|---|
| 45 | ret
|
|---|
| 46 |
|
|---|
| 47 | working:
|
|---|
| 48 | call nl
|
|---|
| 49 | call nl
|
|---|
| 50 | mov si, device
|
|---|
| 51 | call message
|
|---|
| 52 | call waitenter;
|
|---|
| 53 | inc dx
|
|---|
| 54 | cmp dx, 3
|
|---|
| 55 | je keyboard
|
|---|
| 56 | jmp working
|
|---|
| 57 |
|
|---|
| 58 | keyboard:
|
|---|
| 59 | call nl
|
|---|
| 60 | call nl
|
|---|
| 61 | mov si, kbd
|
|---|
| 62 | call message
|
|---|
| 63 | call nl
|
|---|
| 64 | mov si, cont
|
|---|
| 65 | call message
|
|---|
| 66 | ret
|
|---|
| 67 |
|
|---|
| 68 | waitenter:
|
|---|
| 69 | call nl
|
|---|
| 70 | mov si, cont
|
|---|
| 71 | call message
|
|---|
| 72 | xor ax,ax ; Sets AH=0 and AL=0
|
|---|
| 73 | int 16h ; Wait for keypress
|
|---|
| 74 | cmp al, 'T'
|
|---|
| 75 | jz taz
|
|---|
| 76 | cmp al, 't'
|
|---|
| 77 | jz taz
|
|---|
| 78 | cmp al, 13
|
|---|
| 79 | jnz waitenter
|
|---|
| 80 | ret
|
|---|
| 81 |
|
|---|
| 82 | taz:
|
|---|
| 83 | call nl
|
|---|
| 84 | call nl
|
|---|
| 85 | mov si, tazq
|
|---|
| 86 | call message
|
|---|
| 87 | jmp waitenter
|
|---|
| 88 |
|
|---|
| 89 | idleloop:
|
|---|
| 90 | hlt
|
|---|
| 91 | jmp idleloop
|
|---|
| 92 |
|
|---|
| 93 | message:
|
|---|
| 94 | lodsb
|
|---|
| 95 | or al, al
|
|---|
| 96 | jz done
|
|---|
| 97 | mov ah, 0Eh
|
|---|
| 98 | mov bx, 7
|
|---|
| 99 | int 10h
|
|---|
| 100 | jmp message
|
|---|
| 101 |
|
|---|
| 102 | done:
|
|---|
| 103 | ret
|
|---|
| 104 |
|
|---|
| 105 | boot: db 'Loading UniOS 1.1 Beta...' , 0
|
|---|
| 106 | newline: db 10, 13, 0
|
|---|
| 107 | device: db 'Device not responding to SCSI command.' , 0
|
|---|
| 108 | cont: db 'Hit ENTER to continue...', 0
|
|---|
| 109 | kbd: db 'Keyboard not responding to SCSI command.' , 0
|
|---|
| 110 | tazq: db 'Yes, TazQ is an Internet crack monkey on wheels.' , 0
|
|---|
| 111 |
|
|---|
| 112 | times 510-($-$$) db 0
|
|---|
| 113 | dw 0xAA55
|
|---|