tons more work on modularizing the code
This commit is contained in:
@@ -18,13 +18,23 @@
|
||||
; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
; SOFTWARE.
|
||||
|
||||
%ifndef __INC_ERROR_FUNC
|
||||
|
||||
%macro ERROR 1
|
||||
xor ax, ax
|
||||
mov al, %1
|
||||
jmp error
|
||||
%endmacro
|
||||
|
||||
%macro DEBUG_HCF 0
|
||||
DEBUG_LOOP:
|
||||
cli
|
||||
hlt
|
||||
jmp short DEBUG_LOOP
|
||||
%endmacro
|
||||
|
||||
; pass error as ascii character in al, errors a-zA-Z or 0-9
|
||||
ALIGN 4, db 0x90
|
||||
error:
|
||||
; fs = 0xb800 => fs:0x0000 = 0xb8000
|
||||
mov dx, 0xB800
|
||||
@@ -47,4 +57,7 @@ error:
|
||||
|
||||
.stop:
|
||||
hlt
|
||||
jmp short error.stop
|
||||
jmp short error.stop
|
||||
|
||||
%endif
|
||||
%define __INC_ERROR_FUNC
|
||||
Reference in New Issue
Block a user