This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_hex = {'0':0, '1':1, '2':2, '3':3, '4':4, '5':5, | |
'6':6, '7':7, '8':8, '9':9, 'A':10, 'B':11, | |
'C':12, 'D':13, 'E':14, 'F':15} | |
def bit(n1, n2): | |
if str(n1).upper() not in _hex: | |
raise ValueError('Invalid n1') | |
elif str(n2).upper() not in _hex: | |
raise ValueError('Invalid n2') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Simple NASM bootloader, or OS, if you please. | |
; Boots up and displays a black screen, and prints a message. | |
[ORG 0x7C00] ; Specify where to load the code. | |
msg: db 'Hello!' ; Define the msg. | |
len: equ $-msg ; Define the msg length. | |
; Create our "PRINT" function, which takes two arguments: | |
; 1: The message |