自制虚拟机(C/C++)(二、分析引导扇区,虚拟机读二进制文件img软盘)

先修复上一次的bug,添加新指令,并增加图形界面

#include <graphics.h>
#include <conio.h>
#include <windows.h>
#include <commdlg.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <unordered_map>
#include <algorithm>
#include <thread>
#include <mutex>
#include <functional>
#include <vector>
#include <string>
#include <map>void VM(const std::string& file);
// 虚拟机配置结构体
struct VMConfig {std::string name;std::string asmPath;
};// 全局配置存储
std::map<std::string, VMConfig> vmConfigs;
const char* CONFIG_FILE = "vm.dll";// 图形界面尺寸参数
const int WIDTH = 800;
const int HEIGHT = 600;
const int BTN_WIDTH = 200;
const int BTN_HEIGHT = 40;// 当前操作状态
enum class AppState {MAIN_MENU,CREATE_VM,OPEN_VM,SETTINGS
};
AppState currentState = AppState::MAIN_MENU;char vmNameInput[64] = {0};
char asmPathInput[256] = {0};// 初始化图形界面
void InitGUI() {initgraph(WIDTH, HEIGHT);setbkcolor(WHITE);cleardevice();settextcolor(BLACK);settextstyle(30, 0, "宋体");
}// 保存配置到文件
void SaveConfig() {std::ofstream fout(CONFIG_FILE);for (auto it = vmConfigs.begin(); it!= vmConfigs.end(); ++it) {fout << it->first << std::endl;fout << it->second.asmPath << std::endl;}fout.close();
}// 加载配置文件
void LoadConfig() {vmConfigs.clear();std::ifstream fin(CONFIG_FILE);std::string name, path;while (std::getline(fin, name) && std::getline(fin, path)) {vmConfigs[name] = {name, path};}fin.close();
}// 绘制主界面
void DrawMainMenu() {cleardevice();// 绘制标题settextcolor(BLUE);outtextxy(100, 50, "VMwork 虚拟机");// 绘制按钮setfillcolor(LIGHTGRAY);// 新建虚拟机按钮fillroundrect(300, 150, 300 + BTN_WIDTH, 150 + BTN_HEIGHT, 5, 5);outtextxy(330, 155, "新建虚拟机");// 打开虚拟机按钮fillroundrect(300, 250, 300 + BTN_WIDTH, 250 + BTN_HEIGHT, 5, 5);outtextxy(330, 255, "打开虚拟机");// 设置按钮fillroundrect(300, 350, 300 + BTN_WIDTH, 350 + BTN_HEIGHT, 5, 5);outtextxy(350, 355, "设置");
}// 文件选择对话框封装
std::string SelectFile() {OPENFILENAMEA ofn;char szFile[260] = {0};ZeroMemory(&ofn, sizeof(ofn));ofn.lStructSize = sizeof(ofn);ofn.lpstrFile = szFile;ofn.nMaxFile = sizeof(szFile);ofn.lpstrFilter = "ASM Files (*.asm)\0*.asm\0All Files (*.*)\0*.*\0";ofn.nFilterIndex = 1;ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;if (GetOpenFileNameA(&ofn)) {return szFile;}return "";
}// 输入框处理函数
bool InputBox(const char* title, char* buffer, int bufferSize) {char prompt[10] = "";// 这里直接调用 easyx 的 InputBox 函数,按照其参数要求传递return InputBox(buffer, bufferSize, prompt, title); 
}// 创建虚拟机流程
void CreateVMProcess() {// 第一步:选择ASM文件std::string asmPath = SelectFile();if (asmPath.empty()) return;// 第二步:输入虚拟机名称if (!InputBox("输入虚拟机名称", vmNameInput, sizeof(vmNameInput))) return;// 保存配置vmConfigs[vmNameInput] = {vmNameInput, asmPath};SaveConfig();}void OpenVMProcess() {LoadConfig();// 创建选择列表cleardevice();settextcolor(BLACK);outtextxy(50, 50, "选择虚拟机:");// 绘制虚拟机列表int y = 100;for (auto it = vmConfigs.begin(); it!= vmConfigs.end(); ++it) {std::string text = it->first + " (" + it->second.asmPath + ")";outtextxy(100, y, text.c_str());y += 50;}// 等待用户选择int choice = 0;while (true) {if (MouseHit()) {MOUSEMSG msg = GetMouseMsg();if (msg.uMsg == WM_LBUTTONDOWN) {int clickY = msg.y;int index = 0;for (auto it = vmConfigs.begin(); it!= vmConfigs.end(); ++it) {int itemTop = 100 + index * 40;if (clickY > itemTop && clickY < itemTop + 50) {choice = index + 1;break;}index++;}}}if (choice!= 0) break;}// 启动选定虚拟机if (choice > 0 && choice <= vmConfigs.size()) {auto it = vmConfigs.begin();std::advance(it, choice - 1);std::string selectedAsmPath = it->second.asmPath;VM(selectedAsmPath);}
}void SetVMProcess() {LoadConfig();cleardevice();cleardevice();settextcolor(BLACK);outtextxy(30, 50, "虚拟机");outtextxy(50, 90, "处理器  : 1");outtextxy(50, 130, "内存    : 64KB");outtextxy(50, 170,"启动方式: 软盘");outtextxy(50, 210,"光盘    : 无");outtextxy(50, 250,"BIOS    : VMwork");outtextxy(50, 290,"方式    : .ASM");while(1) {}}// 主消息循环
void MainLoop() {AppState prevState = AppState::MAIN_MENU; while (true) {if (MouseHit()) {MOUSEMSG msg = GetMouseMsg();if (msg.uMsg == WM_LBUTTONDOWN) {// 主界面按钮处理if (currentState == AppState::MAIN_MENU) {if (msg.x > 300 && msg.x < 300 + BTN_WIDTH) {if (msg.y > 150 && msg.y < 150 + BTN_HEIGHT) {CreateVMProcess();} else if (msg.y > 250 && msg.y < 250 + BTN_HEIGHT) {OpenVMProcess();} else if (msg.y > 350 && msg.y < 350 + BTN_HEIGHT) {SetVMProcess(); }}}}}switch (currentState) {case AppState::MAIN_MENU:if (prevState!= AppState::MAIN_MENU) {//cleardevice();}DrawMainMenu();break;case AppState::CREATE_VM:if (prevState!= AppState::CREATE_VM) {//cleardevice();}DrawMainMenu();break;case AppState::OPEN_VM:if (prevState!= AppState::OPEN_VM) {//cleardevice();}DrawMainMenu();break;case AppState::SETTINGS:if (prevState!= AppState::SETTINGS) {//cleardevice();}DrawMainMenu();break;}prevState = currentState;Sleep(30);}
}// 寄存器声明
unsigned char al = 0, ah = 0, bl = 0, bh = 0, cl = 0, ch = 0, dl = 0, dh = 0, si = 0;
unsigned short ax = 0, bx = 0, cx = 0, dx = 0, sp = 0x8000, bp = 0;
unsigned int org = 0, end_times = 0, end_AA55 = 0;
bool ZF = false, CF = false, SF = false; // 标志寄存器// 标签和指令指针
std::unordered_map<std::string, size_t> labels;
size_t current_line = 0;
size_t new_current_line;
std::vector<std::string> program_lines;// 内存模拟
std::vector<unsigned char> memory(0x10000, 0); // 64KB内存std::mutex fileMutex;
std::ifstream file;// 线程函数,用于读取文件
void readFile(const std::string& filename) {std::ifstream localFile(filename, std::ios::binary);if (localFile.is_open()) {const size_t bufferSize = 4096; // 每块读取4KB,可以根据需要调整char buffer[bufferSize];std::string currentLine;while (localFile.read(buffer, bufferSize)) {for (size_t i = 0; i < localFile.gcount(); ++i) {if (buffer[i] == '\n') {size_t commentPos = currentLine.find(';');if (commentPos!= std::string::npos) {currentLine = currentLine.substr(0, commentPos);}while (!currentLine.empty() && std::isspace(currentLine.front())) {currentLine.erase(currentLine.begin());}while (!currentLine.empty() && std::isspace(currentLine.back())) {currentLine.erase(currentLine.length() - 1);}if (!currentLine.empty()) {std::lock_guard<std::mutex> lock(fileMutex);program_lines.push_back(currentLine);}currentLine.clear();} else {currentLine += buffer[i];}}}// 处理剩余的行size_t commentPos = currentLine.find(';');if (commentPos!= std::string::npos) {currentLine = currentLine.substr(0, commentPos);}while (!currentLine.empty() && std::isspace(currentLine.front())) {currentLine.erase(currentLine.begin());}while (!currentLine.empty() && std::isspace(currentLine.back())) {currentLine.erase(currentLine.length() - 1);}if (!currentLine.empty()) {std::lock_guard<std::mutex> lock(fileMutex);program_lines.push_back(currentLine);}localFile.close();} else {std::cerr << "无法打开文件" << std::endl;}
}// 图形输出参数
int textX = 0;
int textY = 48;
const int CHAR_WIDTH = 8;
const int LINE_HEIGHT = 16;
bool graphicsInitialized = false;// 指令解析错误枚举
enum class InstructionError {INVALID_OPCODE,INVALID_OPERAND,LABEL_NOT_FOUND,UNKNOWN_INTERRUPT,OTHER_ERROR
};// 输出错误信息到终端
void printError(const InstructionError& error, const std::string& details = "") {std::cerr << "ERROR: ";switch (error) {case InstructionError::INVALID_OPCODE:std::cerr << "无效的操作码";break;case InstructionError::INVALID_OPERAND:std::cerr << "无效的操作数";break;case InstructionError::LABEL_NOT_FOUND:std::cerr << "标签未找到";break;case InstructionError::UNKNOWN_INTERRUPT:std::cerr << "未知的中断号";break;case InstructionError::OTHER_ERROR:std::cerr << "其他错误";break;}if (!details.empty()) {std::cerr << " - " << details;}std::cerr << std::endl;
}int parseImmediate(const std::string& immediateStr) {std::string result;bool inQuote = false;char quoteChar = '\0';for (size_t i = 0; i < immediateStr.size(); ++i) {const char c = immediateStr[i];if (c == '\'' || c == '"') {if (!inQuote) {inQuote = true;quoteChar = c;result += c;} else if (c == quoteChar) {inQuote = false;result += c;} else {result += c;}} else if (inQuote) {// 直接将引号内的字符添加到结果中,包括空格result += c;} else if (!std::isspace(c)) {// 非空格且不在引号内,将字符添加到结果中result += c;} else if (i > 0 &&!std::isspace(result.back())) {// 如果前一个字符不是空格,添加当前字符以保留中间的空格result += c;}}// 去除结果字符串两端可能残留的空格while (!result.empty() && std::isspace(result.front())) {result.erase(result.begin());}while (!result.empty() && std::isspace(result.back())) {result.erase(result.length() - 1);}if (result.empty()) return 0;if (result.length() == 3 && result[0] == '\'' && result[2] == '\'') {return static_cast<int>(result[1]);}else if (result.find("0x") == 0) {try {return std::stoi(result.substr(2), nullptr, 16);} catch (const std::invalid_argument& e) {throw std::invalid_argument("无效的十六进制立即数:" + result);} catch (const std::out_of_range& e) {throw std::out_of_range("十六进制立即数超出范围:" + result);}}else if (result.back() == 'h') {try {return std::stoi(result.substr(0, result.length() - 1), nullptr, 16);} catch (const std::invalid_argument& e) {throw std::invalid_argument("无效的十六进制立即数(以h结尾):" + result);} catch (const std::out_of_range& e) {throw std::out_of_range("十六进制立即数(以h结尾)超出范围:" + result);}}else {try {return std::stoi(result);} catch (const std::invalid_argument& e) {throw std::invalid_argument("无效的立即数:" + result);} catch (const std::out_of_range& e) {throw std::out_of_range("立即数超出范围:" + result);}}
}std::unordered_map<std::string, unsigned char*>& createRegister8BitMap() {static std::unordered_map<std::string, unsigned char*> map = {{"al", &al}, {"ah", &ah}, {"bl", &bl}, {"bh", &bh},{"cl", &cl}, {"ch", &ch}, {"dl", &dl}, {"dh", &dh},{"si", &si}};return map;
}std::unordered_map<std::string, unsigned short*>& createRegister16BitMap() {static std::unordered_map<std::string, unsigned short*> map = {{"ax", &ax}, {"bx", &bx}, {"cx", &cx}, {"dx", &dx},{"sp", &sp}, {"bp", &bp}};return map;
}void UpdateTextPosition() {textX += CHAR_WIDTH;if (textX > 620) {textX = 20;textY += LINE_HEIGHT;}if (textY + LINE_HEIGHT > 480) {cleardevice();textX = 0;textY = 0;}
}void MovInstruction(const std::string& line) {std::string processedLine = line;std::replace(processedLine.begin(), processedLine.end(), ',', ' ');std::istringstream iss(processedLine);std::string opcode, dest, src;iss >> opcode >> dest >> src;auto& reg8 = createRegister8BitMap();auto& reg16 = createRegister16BitMap();auto parseOperand = [&](const std::string& op) -> int {if (reg8.count(op)) return *reg8[op];if (reg16.count(op)) return *reg16[op];return parseImmediate(op);};int value = parseOperand(src);if (reg8.count(dest)) {*reg8[dest] = static_cast<unsigned char>(value);}else if (reg16.count(dest)) {*reg16[dest] = static_cast<unsigned short>(value);}
}// add指令处理函数
void AddInstruction(const std::string& line) {std::string processedLine = line;std::replace(processedLine.begin(), processedLine.end(), ',', ' ');std::istringstream iss(processedLine);std::string opcode, dest, src;iss >> opcode >> dest >> src;auto& reg8 = createRegister8BitMap();auto& reg16 = createRegister16BitMap();auto parseOperand = [&](const std::string& op) -> int {if (reg8.count(op)) return *reg8[op];if (reg16.count(op)) return *reg16[op];return parseImmediate(op);};int val1 = parseOperand(dest);int val2 = parseOperand(src);int result = val1 + val2;if (reg8.count(dest)) {*reg8[dest] = static_cast<unsigned char>(result);}else if (reg16.count(dest)) {*reg16[dest] = static_cast<unsigned short>(result);}ZF = (result == 0);SF = (result < 0);CF = (static_cast<unsigned>(result) < static_cast<unsigned>(val1));
}// sub指令处理函数
void SubInstruction(const std::string& line) {std::string processedLine = line;std::replace(processedLine.begin(), processedLine.end(), ',', ' ');std::istringstream iss(processedLine);std::string opcode, dest, src;iss >> opcode >> dest >> src;auto& reg8 = createRegister8BitMap();auto& reg16 = createRegister16BitMap();auto parseOperand = [&](const std::string& op) -> int {if (reg8.count(op)) return *reg8[op];if (reg16.count(op)) return *reg16[op];return parseImmediate(op);};int val1 = parseOperand(dest);int val2 = parseOperand(src);int result = val1 - val2;if (reg8.count(dest)) {*reg8[dest] = static_cast<unsigned char>(result);}else if (reg16.count(dest)) {*reg16[dest] = static_cast<unsigned short>(result);}ZF = (result == 0);SF = (result < 0);CF = (static_cast<unsigned>(val1) < static_cast<unsigned>(val2));
}// inc指令处理函数
void IncInstruction(const std::string& line) {std::istringstream iss(line);std::string opcode, operand;iss >> opcode >> operand;auto& reg8 = createRegister8BitMap();auto& reg16 = createRegister16BitMap();if (reg8.count(operand)) {*reg8[operand] += 1;ZF = (*reg8[operand] == 0);SF = (*reg8[operand] < 0);}else if (reg16.count(operand)) {*reg16[operand] += 1;ZF = (*reg16[operand] == 0);SF = (*reg16[operand] < 0);}
}void CmpInstruction(const std::string& line) {std::string processedLine = line;std::replace(processedLine.begin(), processedLine.end(), ',', ' ');std::istringstream iss(processedLine);std::string opcode, op1, op2;iss >> opcode >> op1 >> op2;auto& reg8 = createRegister8BitMap();auto& reg16 = createRegister16BitMap();auto parseOperand = [&](const std::string& op) -> int {if (reg8.count(op)) return *reg8[op];if (reg16.count(op)) return *reg16[op];return parseImmediate(op);};int val1 = parseOperand(op1);int val2 = parseOperand(op2);int result = val1 - val2;ZF = (result == 0);SF = (result < 0);CF = (static_cast<unsigned>(val1) < static_cast<unsigned>(val2));
}void JmpInstruction(const std::string& line) {std::istringstream iss(line);std::string opcode, label;iss >> opcode >> label;if (labels.count(label)) {new_current_line = labels[label];} else {printError(InstructionError::LABEL_NOT_FOUND, "JMP指令中的标签: " + label);}
}void JeInstruction(const std::string& line) {std::istringstream iss(line);std::string opcode, label;iss >> opcode >> label;if (ZF) {if (labels.count(label)) {new_current_line = labels[label];} else {printError(InstructionError::LABEL_NOT_FOUND, "JE指令中的标签: " + label);}} else {new_current_line = current_line + 1;}
}void JneInstruction(const std::string& line) {std::istringstream iss(line);std::string opcode, label;iss >> opcode >> label;if (!ZF) {if (labels.count(label)) {new_current_line = labels[label];} else {printError(InstructionError::LABEL_NOT_FOUND, "JNE指令中的标签: " + label);}} else {new_current_line = current_line + 1;}
}void PushInstruction(const std::string& line) {std::istringstream iss(line);std::string opcode, src;iss >> opcode >> src;auto& reg16 = createRegister16BitMap();unsigned short value = reg16.count(src)? *reg16[src] : parseImmediate(src);sp -= 2;memory[sp] = value & 0xFF;memory[sp + 1] = (value >> 8) & 0xFF;
}void PopInstruction(const std::string& line) {std::istringstream iss(line);std::string opcode, dest;iss >> opcode >> dest;auto& reg16 = createRegister16BitMap();if (reg16.count(dest)) {*reg16[dest] = memory[sp] | (memory[sp + 1] << 8);sp += 2;}
}void XorInstruction(const std::string& line) {std::string processedLine = line;std::replace(processedLine.begin(), processedLine.end(), ',', ' ');std::istringstream iss(processedLine);std::string opcode, dest, src;iss >> opcode >> dest >> src;auto& reg8 = createRegister8BitMap();auto& reg16 = createRegister16BitMap();auto parseOperand = [&](const std::string& op) -> int {if (reg8.count(op)) return *reg8[op];if (reg16.count(op)) return *reg16[op];return parseImmediate(op);};int val1 = parseOperand(dest);int val2 = parseOperand(src);int result = val1 ^ val2;if (reg8.count(dest)) {*reg8[dest] = static_cast<unsigned char>(result);}else if (reg16.count(dest)) {*reg16[dest] = static_cast<unsigned short>(result);}ZF = (result == 0);SF = (result < 0);CF = false;
}void PreprocessLabels() {for (size_t i = 0; i < program_lines.size(); ++i) {std::string line = program_lines[i];std::istringstream iss(line);std::string address;if (iss >> address) {// 去除地址中的冒号address.erase(std::remove(address.begin(), address.end(), ':'), address.end());labels[address] = i;}size_t colonPos = line.find(':');if (colonPos!= std::string::npos) {std::string label = line.substr(0, colonPos);labels[label] = i;program_lines[i] = line.substr(colonPos + 1);std::cout << "Label found: " << label << " at line " << i << std::endl;}}
}void IntInstruction(const std::string& line) {std::string processedLine = line;std::replace(processedLine.begin(), processedLine.end(), ',', ' ');std::istringstream iss(processedLine);std::string opcode, interrupt;iss >> opcode >> interrupt;if (interrupt == "0x10" || interrupt == "10h") {if (ah == 0x0E) {if (!graphicsInitialized) {initgraph(640, 480);HWND hwnd = GetHWnd();SetWindowPos(hwnd, HWND_TOP, 100, 100, 0, 0, SWP_NOSIZE);setbkcolor(BLACK);cleardevice();settextcolor(CYAN);settextstyle(16, 0, _T("Courier New Bold"));graphicsInitialized = true;outtextxy(textX, 0, "  VMwork BIOS (PCI)");outtextxy(textX, 16, "  This VGA/VBE BIOS is released under the GNU LGPL");settextcolor(RGB(192, 192, 192));}// 处理特殊字符if (al == 0x0D) {outtextxy(textX, textY, " ");textY += LINE_HEIGHT;}else if (al == 0x0A) {outtextxy(textX, textY, " ");textX = 0;}else {char str[2] = { static_cast<char>(al) };outtextxy(textX, textY, " ");outtextxy(textX, textY, str);UpdateTextPosition();outtextxy(textX, textY, "|");}}if (ah == 0x02 && bh == 0) {textX = 0;textY = 0;}if (ax == 0x0600 && bx == 0x0700 && cx == 0 && dx == 0x184f) {setfillcolor(BLACK);bar(0, 0, 640, 480);}}else if (interrupt == "0x16" || interrupt == "16h") {if (ah == 0) {while (true) {if (_kbhit()) {al = _getch();break;}}}}else {printError(InstructionError::UNKNOWN_INTERRUPT, "未知的中断号: " + interrupt);}
}void CallInstruction(const std::string& line) {std::vector<std::string> tokens;std::istringstream iss(line);std::string token;while (iss >> token) {tokens.push_back(token);}if (tokens.size() < 2) {printError(InstructionError::INVALID_OPERAND, "CALL指令缺少操作数");return;}std::string label = tokens.back();if (labels.count(label)) {// 压入返回地址(当前行号的下一条指令)unsigned short return_line = current_line + 1;sp -= 2;memory[sp] = return_line & 0xFF;memory[sp + 1] = (return_line >> 8) & 0xFF;new_current_line = labels[label];} else {printError(InstructionError::LABEL_NOT_FOUND, "CALL指令中的标签: " + label);}
}void OrgInstruction(const std::string& line) {std::string processedLine = line;std::replace(processedLine.begin(), processedLine.end(), ',', ' ');std::istringstream iss(processedLine);std::string opcode, interrupt;iss >> opcode >> interrupt;if (interrupt == "0x7c00" || interrupt == "0x7C00") {org = 0x7c00;} else {printError(InstructionError::INVALID_OPERAND, "ORG指令的操作数无效: " + interrupt);}
}void TimesInstruction(const std::string& line) {std::string processedLine = line;std::replace(processedLine.begin(), processedLine.end(), ',', ' ');std::istringstream iss(processedLine);std::string opcode, interrupt;iss >> opcode >> interrupt;if (interrupt == "510-($-$$) db 0" || interrupt == "510-($-$$)") {end_times = 1;} else {printError(InstructionError::INVALID_OPERAND, "TIMES指令的操作数无效: " + interrupt);}
}void DwInstruction(const std::string& line) {std::string processedLine = line;std::replace(processedLine.begin(), processedLine.end(), ',', ' ');std::istringstream iss(processedLine);std::string opcode, interrupt;iss >> opcode >> interrupt;if (interrupt == "0xAA55" || interrupt == "0xaa55") {end_AA55 = 1;} else {printError(InstructionError::INVALID_OPERAND, "DW指令的操作数无效: " + interrupt);}
}void VM(const std::string& asmPath) {std::ifstream file(asmPath);if (!file.is_open()) {std::cerr << "无法打开文件: " << asmPath << std::endl;return;}std::string line;while (std::getline(file, line)) {size_t commentPos = line.find(';');if (commentPos!= std::string::npos) {line = line.substr(0, commentPos);}// 去除行首尾的空白字符while (!line.empty() && std::isspace(line.front())) {line.erase(line.begin());}while (!line.empty() && std::isspace(line.back())) {line.erase(line.length() - 1);}if (!line.empty()) {program_lines.push_back(line);}}file.close();for (auto& progLine : program_lines) {for (size_t i = 0; i < progLine.size(); ++i) {if (i < progLine.size() - 2 && progLine[i] == '\'' && progLine[i + 1] ==' ' && progLine[i + 2] == '\'') {progLine[i] = static_cast<char>(0x20);progLine.erase(i + 1, 2);  // 移除后面的空格和单引号}if (i < progLine.size() - 2 && progLine[i] == '\'' && progLine[i + 1] ==':' && progLine[i + 2] == '\'') {progLine[i] = '3';progLine[i + 1] = 'A';progLine[i + 2] = 'h';}if (i < progLine.size() - 2 && progLine[i] == '\'' && progLine[i + 1] ==',' && progLine[i + 2] == '\'') {progLine[i] = '2';progLine[i + 1] = 'C';progLine[i + 2] = 'h';}if (i < progLine.size() - 2 && progLine[i] == '\'' && progLine[i + 1] =='_' && progLine[i + 2] == '\'') {progLine[i] = '5';progLine[i + 1] = 'F';progLine[i + 2] = 'h';}}}PreprocessLabels();// 重置指令指针和新的指令指针new_current_line = current_line;while (current_line < program_lines.size()) {std::istringstream iss(program_lines[current_line]);std::string opcode;iss >> opcode;if (opcode == "mov") MovInstruction(program_lines[current_line]);else if (opcode == "int") IntInstruction(program_lines[current_line]);else if (opcode == "org") OrgInstruction(program_lines[current_line]);else if (opcode == "times") TimesInstruction(program_lines[current_line]);else if (opcode == "dw") DwInstruction(program_lines[current_line]);else if (opcode == "cmp") CmpInstruction(program_lines[current_line]);else if (opcode == "jmp") {std::string label;iss >> label;// 处理相对跳转地址表示法,假设这里的相对跳转是相对于当前行号(根据实际情况调整)if (label.find("0x") == 0) {try {size_t targetAddress = std::stoi(label.substr(2), nullptr, 16);// 如果找到地址标签,更新当前行号if (labels.count(label)) {new_current_line = labels[label];} else {// 处理相对地址size_t relativeAddress = targetAddress - (current_line - labels.begin()->second);new_current_line = current_line + relativeAddress;}} catch (const std::invalid_argument& e) {printError(InstructionError::LABEL_NOT_FOUND, "JMP指令中的非法地址标签: " + label);} catch (const std::out_of_range& e) {printError(InstructionError::LABEL_NOT_FOUND, "JMP指令中的地址标签超出范围: " + label);}} else {JmpInstruction(program_lines[current_line]);}}else if (opcode == "je" || opcode == "jz") JeInstruction(program_lines[current_line]);else if (opcode == "jne" || opcode == "jnz") JneInstruction(program_lines[current_line]);else if (opcode == "push") PushInstruction(program_lines[current_line]);else if (opcode == "pop") PopInstruction(program_lines[current_line]);else if (opcode == "xor") XorInstruction(program_lines[current_line]);else if (opcode == "call") CallInstruction(program_lines[current_line]);else if (opcode == "add") AddInstruction(program_lines[current_line]);else if (opcode == "sub") SubInstruction(program_lines[current_line]);else if (opcode == "inc") IncInstruction(program_lines[current_line]);if (opcode == "jmp" || opcode == "je" || opcode == "jne") {current_line = new_current_line;}else {current_line++;}new_current_line = current_line + 1; }if (graphicsInitialized) {_getch();//closegraph();}
}int main() {InitGUI();LoadConfig();MainLoop();closegraph();system("pause");return 0;
}

要反汇编软盘操作系统,就要用到ndisasm

这个工具在下载nasm时附带了

kernel.asm操作系统内核

org 0x7c00start:mov bp, 0x8000mov sp, bp.print:mov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'H'int 0x10mov al, 'a'int 0x10mov al, 'n'int 0x10mov al, 'O'int 0x10mov al, 'S'int 0x10mov al, '>'int 0x10mov al, '>'int 0x10.wait_input:mov ah, 0x00int 0x16cmp al, 'c'je .check_input_c1cmp al, 'e'je .check_input_ecmp al, 'p'je .check_input_6.pycmp al, '.'je .check_input_pycmp al, 'l'je .check_input_lcmp al, 0x0Dje .bad_inputmov ah, 0x0Eint 0x10jmp .wait_input.check_input_l:mov ah, 0x0Eint 0x10mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 's'jne .wait_inputmov ah, 0x00int 0x16cmp al, 0x0Djne .wait_inputmov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'p'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, 'P'int 0x10mov al, 'Y'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '1'int 0x10mov al, '2'int 0x10mov al, 'B'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'o'int 0x10mov al, 's'int 0x10mov al, ' 'int 0x10mov al, 'S'int 0x10mov al, 'Y'int 0x10mov al, 'S'int 0x10mov al, ' 'int 0x10mov al, '1'int 0x10mov al, '4'int 0x10mov al, '4'int 0x10mov al, '0'int 0x10mov al, 'K'int 0x10mov al, 'B'int 0x10jmp .print.check_input_py:mov ah, 0x0Eint 0x10mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, '\'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'p'jne .wait_inputmov ah, 0x00int 0x16cmp al, 0x0Djne .wait_inputmov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, '6'int 0x10mov al, '6'int 0x10mov al, '6'int 0x10jmp .print.check_input_e:mov ah, 0x0Eint 0x10mov ah, 0x00int 0x16cmp al, 0x0Djne .wait_inputMOV AL,0x13MOV AH,0x00INT 0x10jmp .done.check_input_c1:mov ah, 0x0Eint 0x10mov ah, 0x00int 0x16cmp al, 0x0Djne .wait_input
.bad_input:mov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'b'int 0x10mov al, 'a'int 0x10mov al, 'd'int 0x10jmp .print
.done:retjmp .done.check_input_6.py:mov ah, 0x0Eint 0x10mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, '.'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'p'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'y'jne .wait_inputmov ah, 0x00int 0x16cmp al, 0x0Djne .wait_inputmov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'p'int 0x10mov al, 'r'int 0x10mov al, 'i'int 0x10mov al, 'n'int 0x10mov al, 't'int 0x10mov al, '('int 0x10mov al, '"'int 0x10mov al, '6'int 0x10mov al, '6'int 0x10mov al, '6'int 0x10mov al, '"'int 0x10mov al, ')'int 0x10jmp .printtimes 510-($-$$) db 0
dw 0xAA55

toasm.py用于转换标准nasm

import re
import sys
import chardetdef process_files(input_file_path, output_file_path):# 探测原始文件的编码with open(input_file_path, 'rb') as f:result = chardet.detect(f.read())encoding = result['encoding']pattern = re.compile(r'^([0-9A-Fa-f]{8})\s+([0-9A-Fa-f ]+)\s+(.*)$')with open(input_file_path, 'r', encoding=encoding) as input_file, open(output_file_path, 'w',encoding='utf - 8') as output_file:for line in input_file:line = line.rstrip()if match := pattern.match(line):addr_str, _, instr = match.groups()addr = int(addr_str, 16)output_file.write(f"0x{addr:x}:\n")output_file.write(f"{instr}\n")else:output_file.write(line + "\n")if __name__ == "__main__":if len(sys.argv)!= 3:print("Usage: python script_name.py input_file output_file")sys.exit(1)input_file_path = sys.argv[1]output_file_path = sys.argv[2]process_files(input_file_path, output_file_path)

接下来

nasm kernel.asm -o os.img

os.img是完整的操作系统,可以VMware运行

反汇编

.\ndisasm 123.img > os.img.asm
python toasm.py os.img.asm os.asm

可能需要

pip intall chardet

 编译

g++ main.cpp -o VMwork -std=c++11 -leasyx -lcomdlg32

 双击VMwork.exe

新建虚拟机选择os.asm

打开虚拟机

 运行成功

接下来移植我们以前自制的操作系统HanOS

 


; TAB=4[INSTRSET "i486p"]mov ah, 0x00mov al, 0x03 ; 80x25 文本模式int 0x10; 设置矩形的起始坐标和大小mov dh, 0 ; 矩形上边的 y 坐标mov dl, 0 ; 矩形左边的 x 坐标mov bh, 0  ; 页面号mov cx, 0  ; 矩形的宽度和高度mov cl, 10  ; 宽度mov ch, 10  ; 高度; 绘制矩形
draw_rect:; 设置光标位置mov ah, 0x02int 0x10; 设置矩形颜色mov ah, 0x09mov al, ' ' ; 空格字符mov bl, 0x04 ; 使用预设的蓝色int 0x10add dl, 1loop draw_rectmov ah, 02hxor bh, bhmov dh, 0mov dl, 0int 10hjmp .start.wait_input3:mov ah, 0x00int 0x16cmp al, 0x0Dje .errormov ah, 0x0Eint 0x10jmp .wait_input3.wait_input4:mov ah, 0x00int 0x16cmp al, 0x0Dje .errormov ah, 0x0Emov al, '*'int 0x10jmp .wait_input4.error:mov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'E'int 0x10mov al, 'R'int 0x10mov al, 'R'int 0x10mov al, 'O'int 0x10mov al, 'R'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10jmp .check_input_pass
.start:mov si, 0mov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, '\'int 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '`'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '"'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, '\'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '\'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, '\'int 0x10mov al, ' 'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '('int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ')'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, '\'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ','int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, '\'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '/'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10.check_input_pass:mov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '/'int 0x10mov al, '-'int 0x10mov al, '-'int 0x10mov al, '-'int 0x10mov al, '\'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '\'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '/'int 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '\'int 0x10mov al, '\'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '('int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, 'p'int 0x10mov al, 'a'int 0x10mov al, 's'int 0x10mov al, 's'int 0x10mov al, 'w'int 0x10mov al, 'o'int 0x10mov al, 'r'int 0x10mov al, 'd'int 0x10mov al, '|'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, '|'int 0x10mov al, '-'int 0x10mov al, '-'int 0x10mov al, '-'int 0x10mov al, '-'int 0x10mov al, '-'int 0x10mov al, '-'int 0x10mov al, '-'int 0x10mov al, '-'int 0x10mov al, '-'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '\'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '/'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, 'a'int 0x10mov al, 'd'int 0x10mov al, 'm'int 0x10mov al, 'i'int 0x10mov al, 'n'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'A'int 0x10mov al, 'D'int 0x10mov al, 'M'int 0x10mov al, 'I'int 0x10mov al, 'N'int 0x10mov al, ':'int 0x10mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'l'jne .wait_input3mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'i'jne .wait_input3mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'n'jne .wait_input3mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'h'jne .wait_input3mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'o'jne .wait_input3mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'n'jne .wait_input3mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'g'jne .wait_input3mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'h'jne .wait_input3mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'a'jne .wait_input3mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'n'jne .wait_input3mov ah, 0x00int 0x16cmp al, 0x0Djne .wait_input3mov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'P'int 0x10mov al, 'A'int 0x10mov al, 'S'int 0x10mov al, 'S'int 0x10mov al, 'W'int 0x10mov al, 'O'int 0x10mov al, 'R'int 0x10mov al, 'D'int 0x10mov al, ':'int 0x10mov ah, 0x00int 0x16cmp al, '6'mov ah, 0x0Emov al, '*'int 0x10jne .wait_input4mov ah, 0x00int 0x16cmp al, '6'mov ah, 0x0Emov al, '*'int 0x10jne .wait_input4mov ah, 0x00int 0x16cmp al, '6'mov ah, 0x0Emov al, '*'int 0x10jne .wait_input4mov ah, 0x00int 0x16cmp al, '6'mov ah, 0x0Emov al, '*'int 0x10jne .wait_input4mov ah, 0x00int 0x16cmp al, '6'mov ah, 0x0Emov al, '*'int 0x10jne .wait_input4mov ah, 0x00int 0x16cmp al, '6'mov ah, 0x0Emov al, '*'int 0x10jne .wait_input4mov ah, 0x00int 0x16cmp al, 0x0Dmov ah, 0x0Emov al, '*'int 0x10jne .wait_input4_start:; 初始化文本模式视频mov ah, 0x00mov al, 0x03 ; 80x25 文本模式int 0x10; 设置矩形的起始坐标和大小mov dh, 0 ; 矩形上边的 y 坐标mov dl, 0 ; 矩形左边的 x 坐标mov bh, 0  ; 页面号mov cx, 0  ; 矩形的宽度和高度mov cl, 10  ; 宽度mov ch, 10  ; 高度; 绘制矩形draw_rect1:; 设置光标位置mov ah, 0x02int 0x10; 设置矩形颜色mov ah, 0x09mov al, ' ' ; 空格字符mov bl, 0x1E ; 使用预设的蓝色int 0x10add dl, 1loop draw_rect1mov ah, 0x0Emov al, 'H'int 0x10mov al, 'a'int 0x10mov al, 'n'int 0x10mov al, 'O'int 0x10mov al, 'S'int 0x10mov al, ' 'int 0x10mov al, 'B'int 0x10mov al, 'I'int 0x10mov al, 'O'int 0x10mov al, 'S'int 0x10mov dh, 23 ; 矩形上边的 y 坐标mov dl, 43 ; 矩形左边的 x 坐标mov bh, 0  ; 页面号mov cx, 0  ; 矩形的宽度和高度mov cl, 1  ; 宽度mov ch, 1  ; 高度; 绘制矩形draw_rect2:; 设置光标位置mov ah, 0x02int 0x10; 设置矩形颜色mov ah, 0x09mov al, ' ' ; 空格字符mov bl, 0xF0 ; 使用预设的蓝色int 0x10; 更新坐标并绘制下一个字符add dl, 1loop draw_rect2start:mov ah, 02hxor bh, bhmov dh, 0mov dl, 0int 10hmov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, '\'int 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '`'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '"'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, '\'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '\'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, '\'int 0x10mov al, ' 'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '('int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ')'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, '\'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ','int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, '\'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '/'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10.print:mov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'H'int 0x10mov al, 'a'int 0x10mov al, 'n'int 0x10mov al, 'O'int 0x10mov al, 'S'int 0x10mov al, '/'int 0x10inc cxcmp cx, 5je _startcmp si, 1je .ccmp si, 2je .dcmp si, 6je .cSystemmov al, '>'int 0x10mov al, '>'int 0x10.wait_input:mov ah, 0x00int 0x16cmp al, 'c'je .check_input_c1cmp al, 'e'je .check_input_ecmp al, 'p'je .check_input_print.pycmp al, '.'je .check_input_.cmp al, 'l'je .check_input_lcmp al, 'W'je .check_input_WiFicmp al, 'O'je .OScmp al, 'w'je .writercmp al, 'R'je .READMEcmp al, 'h'je .helpcmp al, 0x0Dje .bad_inputmov ah, 0x0Eint 0x10jmp .wait_input.wait_input2:mov ah, 0x00int 0x16cmp al, 0x0Dje .bad_inputmov ah, 0x0Emov al, '*'int 0x10jmp .wait_input2.c:mov al, 'C'int 0x10mov al, ':'int 0x10mov al, '/'int 0x10mov al, '>'int 0x10mov al, '>'int 0x10jmp .wait_input.cSystem:mov al, 'C'int 0x10mov al, ':'int 0x10mov al, '/'int 0x10mov al, 'S'int 0x10mov al, 'y'int 0x10mov al, 's'int 0x10mov al, 't'int 0x10mov al, 'e'int 0x10mov al, 'm'int 0x10mov al, '>'int 0x10mov al, '>'int 0x10jmp .wait_input.d:mov al, 'D'int 0x10mov al, ':'int 0x10mov al, '/'int 0x10mov al, '>'int 0x10mov al, '>'int 0x10jmp .wait_input.check_input_.:mov ah, 0x0Eint 0x10cmp si, 6jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, '\'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'O'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'S'jne .wait_inputmov ah, 0x00int 0x16cmp al, 0x0Djne .wait_inputmov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, '\'int 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '`'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '"'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, '\'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '\'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, '\'int 0x10mov al, ' 'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '('int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ')'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, '\'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ','int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, '\'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '/'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10jmp .print.check_input_l:mov ah, 0x0Eint 0x10mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 's'jne .wait_inputmov ah, 0x00int 0x16cmp al, 0x0Djne .wait_inputcmp si, 0je .check_input_l0cmp si, 1je .check_input_l1cmp si, 6je .check_input_l6cmp si, 2je .check_input_l2.check_input_l0:mov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'P'int 0x10mov al, 'A'int 0x10mov al, 'T'int 0x10mov al, 'H'int 0x10mov al, ':'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'H'int 0x10mov al, 'a'int 0x10mov al, 'n'int 0x10mov al, 'O'int 0x10mov al, 'S'int 0x10mov al, '/'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'F'int 0x10mov al, 'O'int 0x10mov al, 'L'int 0x10mov al, 'D'int 0x10mov al, 'E'int 0x10mov al, 'R'int 0x10mov al, ':'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'C'int 0x10mov al, ':'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'D'int 0x10mov al, ':'int 0x10jmp .print.check_input_l1:mov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'P'int 0x10mov al, 'A'int 0x10mov al, 'T'int 0x10mov al, 'H'int 0x10mov al, ':'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'H'int 0x10mov al, 'a'int 0x10mov al, 'n'int 0x10mov al, 'O'int 0x10mov al, 'S'int 0x10mov al, '/'int 0x10mov al, 'C'int 0x10mov al, ':'int 0x10mov al, '/'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'F'int 0x10mov al, 'O'int 0x10mov al, 'L'int 0x10mov al, 'D'int 0x10mov al, 'E'int 0x10mov al, 'R'int 0x10mov al, ':'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'S'int 0x10mov al, 'y'int 0x10mov al, 's'int 0x10mov al, 't'int 0x10mov al, 'e'int 0x10mov al, 'm'int 0x10mov al, '/'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'F'int 0x10mov al, 'I'int 0x10mov al, 'L'int 0x10mov al, 'E'int 0x10mov al, ':'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, 'N'int 0x10mov al, 'A'int 0x10mov al, 'M'int 0x10mov al, 'E'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, 'K'int 0x10mov al, 'I'int 0x10mov al, 'N'int 0x10mov al, 'D'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, 'B'int 0x10mov al, 'I'int 0x10mov al, 'T'int 0x10mov al, 'S'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'i'int 0x10mov al, 'p'int 0x10mov al, 'l'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, 'B'int 0x10mov al, 'I'int 0x10mov al, 'N'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '1'int 0x10mov al, 'K'int 0x10mov al, 'B'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'h'int 0x10mov al, 'a'int 0x10mov al, 'n'int 0x10mov al, 'o'int 0x10mov al, 's'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, 'S'int 0x10mov al, 'Y'int 0x10mov al, 'S'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '1'int 0x10mov al, '4'int 0x10mov al, '4'int 0x10mov al, '0'int 0x10mov al, 'K'int 0x10mov al, 'B'int 0x10jmp .print.check_input_l6:mov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'P'int 0x10mov al, 'A'int 0x10mov al, 'T'int 0x10mov al, 'H'int 0x10mov al, ':'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'H'int 0x10mov al, 'a'int 0x10mov al, 'n'int 0x10mov al, 'O'int 0x10mov al, 'S'int 0x10mov al, '/'int 0x10mov al, 'C'int 0x10mov al, ':'int 0x10mov al, '/'int 0x10mov al, 'S'int 0x10mov al, 'y'int 0x10mov al, 's'int 0x10mov al, 't'int 0x10mov al, 'e'int 0x10mov al, 'm'int 0x10mov al, '/'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'F'int 0x10mov al, 'I'int 0x10mov al, 'L'int 0x10mov al, 'E'int 0x10mov al, ':'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, 'N'int 0x10mov al, 'A'int 0x10mov al, 'M'int 0x10mov al, 'E'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, 'K'int 0x10mov al, 'I'int 0x10mov al, 'N'int 0x10mov al, 'D'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, 'B'int 0x10mov al, 'I'int 0x10mov al, 'T'int 0x10mov al, 'S'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'O'int 0x10mov al, 'S'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, 'L'int 0x10mov al, 'H'int 0x10mov al, 'H'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '1'int 0x10mov al, 'K'int 0x10mov al, 'B'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'R'int 0x10mov al, 'E'int 0x10mov al, 'A'int 0x10mov al, 'D'int 0x10mov al, 'M'int 0x10mov al, 'E'int 0x10mov al, ' 'int 0x10mov al, 'M'int 0x10mov al, 'D'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '1'int 0x10mov al, 'K'int 0x10mov al, 'B'int 0x10jmp .print.check_input_l2:mov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'P'int 0x10mov al, 'A'int 0x10mov al, 'T'int 0x10mov al, 'H'int 0x10mov al, ':'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'H'int 0x10mov al, 'a'int 0x10mov al, 'n'int 0x10mov al, 'O'int 0x10mov al, 'S'int 0x10mov al, '/'int 0x10mov al, 'D'int 0x10mov al, ':'int 0x10mov al, '/'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'F'int 0x10mov al, 'I'int 0x10mov al, 'L'int 0x10mov al, 'E'int 0x10mov al, ':'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, 'N'int 0x10mov al, 'A'int 0x10mov al, 'M'int 0x10mov al, 'E'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, 'K'int 0x10mov al, 'I'int 0x10mov al, 'N'int 0x10mov al, 'D'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, 'B'int 0x10mov al, 'I'int 0x10mov al, 'T'int 0x10mov al, 'S'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'h'int 0x10mov al, 'a'int 0x10mov al, 'n'int 0x10mov al, 'o'int 0x10mov al, 's'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, 'B'int 0x10mov al, 'I'int 0x10mov al, 'N'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '2'int 0x10mov al, 'K'int 0x10mov al, 'B'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'p'int 0x10mov al, 'r'int 0x10mov al, 'i'int 0x10mov al, 'n'int 0x10mov al, 't'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, 'P'int 0x10mov al, 'Y'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '1'int 0x10mov al, '2'int 0x10mov al, 'B'int 0x10jmp .print.check_input_py:cmp si, 2jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 't'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'h'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'o'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'n'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, ' 'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'p'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'r'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'i'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'n'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 't'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, '.'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'p'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'y'jne .wait_inputmov ah, 0x00int 0x16cmp al, 0x0Djne .wait_inputmov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, '6'int 0x10mov al, '6'int 0x10mov al, '6'int 0x10jmp .print.check_input_e:mov ah, 0x0Eint 0x10mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'x'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'i'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 't'jne .wait_inputmov ah, 0x00int 0x16cmp al, 0x0Djne .wait_inputMOV AL,0x13MOV AH,0x00INT 0x10jmp .done.check_input_cd0:mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, ' 'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'H'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'a'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'n'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'O'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'S'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, '/'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'C'je .check_input_cd1cmp al, 'D'je .check_input_cd2cmp al, 0x0Djne .wait_inputmov si, 0jmp .print.check_input_cd1:mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, ':'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, '/'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'S'je .cd11cmp al, 0x0Djne .wait_inputmov si, 1jmp .print.cd11:mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'y'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 's'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 't'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'e'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'm'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, '/'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 0x0Djne .wait_inputmov si, 6jmp .print.check_input_cd2:mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, ':'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, '/'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 0x0Djne .wait_inputmov si, 2jmp .print.check_input_c1:mov ah, 0x0Eint 0x10mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'd'je .check_input_cd0cmp al, 'l'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 's'jne .wait_inputmov ah, 0x00int 0x16cmp al, 0x0Djne .wait_inputmov ax, 0x0600mov bx, 0x0700mov cx, 0mov dx, 0x184fint 0x10mov ah, 02hxor bh, bhmov dh, 0mov dl, 0int 10hjmp _start.help:mov ah, 0x0Eint 0x10mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'e'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'l'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'p'jne .wait_inputmov ah, 0x00int 0x16cmp al, 0x0Djne .wait_inputmov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, '-'int 0x10mov al, ' 'int 0x10mov al, '`'int 0x10mov al, 'c'int 0x10mov al, 'l'int 0x10mov al, 's'int 0x10mov al, '`'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, '-'int 0x10mov al, ' 'int 0x10mov al, '`'int 0x10mov al, 'c'int 0x10mov al, 'd'int 0x10mov al, '`'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, '-'int 0x10mov al, ' 'int 0x10mov al, '`'int 0x10mov al, 'e'int 0x10mov al, 'x'int 0x10mov al, 'i'int 0x10mov al, 't'int 0x10mov al, '`'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, '-'int 0x10mov al, ' 'int 0x10mov al, '`'int 0x10mov al, 'w'int 0x10mov al, 'r'int 0x10mov al, 'i'int 0x10mov al, 't'int 0x10mov al, 'e'int 0x10mov al, 'r'int 0x10mov al, '`'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, '-'int 0x10mov al, ' 'int 0x10mov al, '`'int 0x10mov al, 'W'int 0x10mov al, 'i'int 0x10mov al, 'F'int 0x10mov al, 'i'int 0x10mov al, '`'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, '-'int 0x10mov al, ' 'int 0x10mov al, '`'int 0x10mov al, 'h'int 0x10mov al, 'e'int 0x10mov al, 'l'int 0x10mov al, 'p'int 0x10mov al, '`'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, '-'int 0x10mov al, ' 'int 0x10mov al, '`'int 0x10mov al, 'p'int 0x10mov al, 'y'int 0x10mov al, 't'int 0x10mov al, 'h'int 0x10mov al, 'o'int 0x10mov al, 'n'int 0x10mov al, '`'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'A'int 0x10mov al, 'n'int 0x10mov al, 'd'int 0x10mov al, ' 'int 0x10mov al, 'm'int 0x10mov al, 'o'int 0x10mov al, 'r'int 0x10mov al, 'e'int 0x10mov al, '.'int 0x10mov al, '.'int 0x10mov al, '.'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10jmp .print.README:mov ah, 0x0Eint 0x10cmp si, 6jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'E'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'A'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'D'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'M'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'E'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, '.'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'm'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'd'jne .wait_inputmov ah, 0x00int 0x16cmp al, 0x0Djne .wait_inputmov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, '#'int 0x10mov al, ' 'int 0x10mov al, 'H'int 0x10mov al, 'a'int 0x10mov al, 'n'int 0x10mov al, 'O'int 0x10mov al, 'S'int 0x10mov al, ' 'int 0x10mov al, 'I'int 0x10mov al, 'n'int 0x10mov al, 't'int 0x10mov al, 'r'int 0x10mov al, 'o'int 0x10mov al, 'd'int 0x10mov al, 'u'int 0x10mov al, 'c'int 0x10mov al, 'e'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'T'int 0x10mov al, 'h'int 0x10mov al, 'i'int 0x10mov al, 's'int 0x10mov al, ' 'int 0x10mov al, 'o'int 0x10mov al, 'p'int 0x10mov al, 'e'int 0x10mov al, 'r'int 0x10mov al, 'a'int 0x10mov al, 't'int 0x10mov al, 'i'int 0x10mov al, 'n'int 0x10mov al, 'g'int 0x10mov al, ' 'int 0x10mov al, 's'int 0x10mov al, 'y'int 0x10mov al, 's'int 0x10mov al, 't'int 0x10mov al, 'e'int 0x10mov al, 'm'int 0x10mov al, ' 'int 0x10mov al, 'i'int 0x10mov al, 's'int 0x10mov al, ' 'int 0x10mov al, 'm'int 0x10mov al, 'a'int 0x10mov al, 'd'int 0x10mov al, 'e'int 0x10mov al, ' 'int 0x10mov al, 'b'int 0x10mov al, 'y'int 0x10mov al, ' 'int 0x10mov al, 'l'int 0x10mov al, 'i'int 0x10mov al, 'n'int 0x10mov al, 'h'int 0x10mov al, 'o'int 0x10mov al, 'n'int 0x10mov al, 'g'int 0x10mov al, 'h'int 0x10mov al, 'a'int 0x10mov al, 'n'int 0x10mov al, ','int 0x10mov al, ' 'int 0x10mov al, 'a'int 0x10mov al, ' 'int 0x10mov al, 'C'int 0x10mov al, 'h'int 0x10mov al, 'i'int 0x10mov al, 'n'int 0x10mov al, 'e'int 0x10mov al, 's'int 0x10mov al, 'e'int 0x10mov al, ' 'int 0x10mov al, 'p'int 0x10mov al, 'r'int 0x10mov al, 'i'int 0x10mov al, 'm'int 0x10mov al, 'a'int 0x10mov al, 'r'int 0x10mov al, 'y'int 0x10mov al, ' 'int 0x10mov al, 's'int 0x10mov al, 'c'int 0x10mov al, 'h'int 0x10mov al, 'o'int 0x10mov al, 'o'int 0x10mov al, 'l'int 0x10mov al, ' 'int 0x10mov al, 's'int 0x10mov al, 't'int 0x10mov al, 'u'int 0x10mov al, 'd'int 0x10mov al, 'e'int 0x10mov al, 'n'int 0x10mov al, 't'int 0x10mov al, '.'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'T'int 0x10mov al, 'h'int 0x10mov al, 'i'int 0x10mov al, 's'int 0x10mov al, ' 'int 0x10mov al, 'k'int 0x10mov al, 'e'int 0x10mov al, 'r'int 0x10mov al, 'n'int 0x10mov al, 'e'int 0x10mov al, 'l'int 0x10mov al, ' 'int 0x10mov al, 'o'int 0x10mov al, 'f'int 0x10mov al, ' 'int 0x10mov al, 'o'int 0x10mov al, 'p'int 0x10mov al, 'e'int 0x10mov al, 'r'int 0x10mov al, 'a'int 0x10mov al, 't'int 0x10mov al, 'i'int 0x10mov al, 'n'int 0x10mov al, 'g'int 0x10mov al, ' 'int 0x10mov al, 's'int 0x10mov al, 'y'int 0x10mov al, 's'int 0x10mov al, 't'int 0x10mov al, 'e'int 0x10mov al, 'm'int 0x10mov al, ' 'int 0x10mov al, 'w'int 0x10mov al, 'a'int 0x10mov al, 's'int 0x10mov al, ' 'int 0x10mov al, 'm'int 0x10mov al, 'a'int 0x10mov al, 'd'int 0x10mov al, 'e'int 0x10mov al, ' 'int 0x10mov al, 'b'int 0x10mov al, 'y'int 0x10mov al, ' 'int 0x10mov al, 'h'int 0x10mov al, 'i'int 0x10mov al, 'm'int 0x10mov al, 's'int 0x10mov al, 'e'int 0x10mov al, 'l'int 0x10mov al, 'f'int 0x10mov al, '.'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'T'int 0x10mov al, 'h'int 0x10mov al, 'e'int 0x10mov al, 'r'int 0x10mov al, 'e'int 0x10mov al, ' 'int 0x10mov al, 'a'int 0x10mov al, 'r'int 0x10mov al, 'e'int 0x10mov al, ' 'int 0x10mov al, 't'int 0x10mov al, 'h'int 0x10mov al, 'e'int 0x10mov al, ' 'int 0x10mov al, 'c'int 0x10mov al, 'o'int 0x10mov al, 'm'int 0x10mov al, 'm'int 0x10mov al, 'a'int 0x10mov al, 'n'int 0x10mov al, 'd'int 0x10mov al, ' 'int 0x10mov al, 'i'int 0x10mov al, 'n'int 0x10mov al, ' 'int 0x10mov al, 't'int 0x10mov al, 'h'int 0x10mov al, 'e'int 0x10mov al, ' 'int 0x10mov al, 'H'int 0x10mov al, 'a'int 0x10mov al, 'n'int 0x10mov al, ' 'int 0x10mov al, 'O'int 0x10mov al, 'p'int 0x10mov al, 'e'int 0x10mov al, 'r'int 0x10mov al, 'a'int 0x10mov al, 't'int 0x10mov al, 'i'int 0x10mov al, 'n'int 0x10mov al, 'g'int 0x10mov al, ' 'int 0x10mov al, 'S'int 0x10mov al, 'y'int 0x10mov al, 's'int 0x10mov al, 't'int 0x10mov al, 'e'int 0x10mov al, 'm'int 0x10mov al, ':'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, '-'int 0x10mov al, ' 'int 0x10mov al, '`'int 0x10mov al, 'c'int 0x10mov al, 'l'int 0x10mov al, 's'int 0x10mov al, '`'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, '-'int 0x10mov al, ' 'int 0x10mov al, '`'int 0x10mov al, 'c'int 0x10mov al, 'd'int 0x10mov al, '`'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, '-'int 0x10mov al, ' 'int 0x10mov al, '`'int 0x10mov al, 'e'int 0x10mov al, 'x'int 0x10mov al, 'i'int 0x10mov al, 't'int 0x10mov al, '`'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, '-'int 0x10mov al, ' 'int 0x10mov al, '`'int 0x10mov al, 'w'int 0x10mov al, 'r'int 0x10mov al, 'i'int 0x10mov al, 't'int 0x10mov al, 'e'int 0x10mov al, 'r'int 0x10mov al, '`'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, '-'int 0x10mov al, ' 'int 0x10mov al, '`'int 0x10mov al, 'W'int 0x10mov al, 'i'int 0x10mov al, 'F'int 0x10mov al, 'i'int 0x10mov al, '`'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, '-'int 0x10mov al, ' 'int 0x10mov al, '`'int 0x10mov al, 'h'int 0x10mov al, 'e'int 0x10mov al, 'l'int 0x10mov al, 'p'int 0x10mov al, '`'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, '-'int 0x10mov al, ' 'int 0x10mov al, '`'int 0x10mov al, 'p'int 0x10mov al, 'y'int 0x10mov al, 't'int 0x10mov al, 'h'int 0x10mov al, 'o'int 0x10mov al, 'n'int 0x10mov al, '`'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'A'int 0x10mov al, 'n'int 0x10mov al, 'd'int 0x10mov al, ' 'int 0x10mov al, 'm'int 0x10mov al, 'o'int 0x10mov al, 'r'int 0x10mov al, 'e'int 0x10mov al, '.'int 0x10mov al, '.'int 0x10mov al, '.'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10jmp .print.bad_input:mov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'b'int 0x10mov al, 'a'int 0x10mov al, 'd'int 0x10jmp .print
.done:retjmp .done.check_input_WiFi:mov ah, 0x0Eint 0x10mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'i'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'F'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'i'jne .wait_inputmov ah, 0x00int 0x16cmp al, 0x0Djne .wait_inputmov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'N'int 0x10mov al, 'A'int 0x10mov al, 'M'int 0x10mov al, 'E'int 0x10mov al, ':'int 0x10mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, '1'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, '2'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, '3'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, '4'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, '5'jne .wait_inputmov ah, 0x00int 0x16cmp al, 0x0Djne .wait_inputmov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'P'int 0x10mov al, 'A'int 0x10mov al, 'S'int 0x10mov al, 'S'int 0x10mov al, 'W'int 0x10mov al, 'O'int 0x10mov al, 'R'int 0x10mov al, 'D'int 0x10mov al, ':'int 0x10mov ah, 0x00int 0x16cmp al, '1'mov ah, 0x0Emov al, '*'int 0x10jne .wait_input2mov ah, 0x00int 0x16cmp al, '2'mov ah, 0x0Emov al, '*'int 0x10jne .wait_input2mov ah, 0x00int 0x16cmp al, '3'mov ah, 0x0Emov al, '*'int 0x10jne .wait_input2mov ah, 0x00int 0x16cmp al, '4'mov ah, 0x0Emov al, '*'int 0x10jne .wait_input2mov ah, 0x00int 0x16cmp al, '5'mov ah, 0x0Emov al, '*'int 0x10jne .wait_input2mov ah, 0x00int 0x16cmp al, '6'mov ah, 0x0Emov al, '*'int 0x10jne .wait_input2mov ah, 0x00int 0x16cmp al, '7'mov ah, 0x0Emov al, '*'int 0x10jne .wait_input2mov ah, 0x00int 0x16cmp al, '8'mov ah, 0x0Emov al, '*'int 0x10jne .wait_input2mov ah, 0x00int 0x16cmp al, '9'mov ah, 0x0Emov al, '*'int 0x10jne .wait_input2mov ah, 0x00int 0x16cmp al, '0'mov ah, 0x0Emov al, '*'int 0x10jne .wait_input2mov ah, 0x00int 0x16cmp al, 0x0Dmov ah, 0x0Emov al, '*'int 0x10jne .wait_input2mov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'W'int 0x10mov al, 'i'int 0x10mov al, 'F'int 0x10mov al, 'i'int 0x10mov al, ' 'int 0x10mov al, 'i'int 0x10mov al, 's'int 0x10mov al, ' 'int 0x10mov al, 'r'int 0x10mov al, 'e'int 0x10mov al, 'a'int 0x10mov al, 'd'int 0x10mov al, 'y'int 0x10jmp .print.check_input_print.py:mov ah, 0x0Eint 0x10cmp si, 2jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'y'je .check_input_pycmp al, 'r'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'i'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'n'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 't'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, '.'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'p'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'y'jne .wait_inputmov ah, 0x00int 0x16cmp al, 0x0Djne .wait_inputmov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'p'int 0x10mov al, 'r'int 0x10mov al, 'i'int 0x10mov al, 'n'int 0x10mov al, 't'int 0x10mov al, '('int 0x10mov al, '"'int 0x10mov al, '6'int 0x10mov al, '6'int 0x10mov al, '6'int 0x10mov al, '"'int 0x10mov al, ')'int 0x10jmp .print.OS:mov ah, 0x0Eint 0x10mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'S'jne .wait_inputmov ah, 0x00int 0x16cmp al, 0x0Djne .wait_inputmov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'O'int 0x10mov al, 'S'int 0x10mov al, ':'int 0x10mov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'H'int 0x10mov al, 'a'int 0x10mov al, 'n'int 0x10mov al, 'O'int 0x10mov al, 'S'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '('int 0x10mov al, '1'int 0x10mov al, ')'int 0x10mov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, 'C'int 0x10mov al, 'h'int 0x10mov al, 'o'int 0x10mov al, 'o'int 0x10mov al, 's'int 0x10mov al, 'e'int 0x10mov al, ':'int 0x10mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, '1'jne .printjmp .asmhead_code.writer:mov ah, 0x0Eint 0x10mov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'r'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'i'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 't'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'e'jne .wait_inputmov ah, 0x00int 0x16mov ah, 0x0Eint 0x10cmp al, 'r'jne .wait_inputmov ah, 0x00int 0x16cmp al, 0x0Djne .wait_inputmov ah, 0x0Emov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '+'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '/'int 0x10mov al, '\'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, '-'int 0x10mov al, '-'int 0x10mov al, '|'int 0x10mov al, '-'int 0x10mov al, '-'int 0x10mov al, ' 'int 0x10mov al, '-'int 0x10mov al, '-'int 0x10mov al, '|'int 0x10mov al, '-'int 0x10mov al, '-'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '\'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '-'int 0x10mov al, '_'int 0x10mov al, '-'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '\'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, '/'int 0x10mov al, '|'int 0x10mov al, '\'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '/'int 0x10mov al, '|'int 0x10mov al, '\'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '-'int 0x10mov al, '-'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '/'int 0x10mov al, '-'int 0x10mov al, '-'int 0x10mov al, '-'int 0x10mov al, '-'int 0x10mov al, '\'int 0x10mov al, '_'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '\'int 0x10mov al, ' 'int 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '\'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, '/'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '\'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, '|'int 0x10mov al, '_'int 0x10mov al, '_'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '\'int 0x10mov al, '|'int 0x10mov al, '\'int 0x10mov al, '|'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '_'int 0x10mov al, '/'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '|'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, ' 'int 0x10mov al, '/'int 0x10mov al, '|'int 0x10mov al, '/'int 0x10mov al, '|'int 0x10mov al, 0x0Dint 0x10mov al, 0x0Aint 0x10jmp .print.asmhead_code:

运行成功! 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/10790.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

LeetCode:63. 不同路径 II

跟着carl学算法&#xff0c;本系列博客仅做个人记录&#xff0c;建议大家都去看carl本人的博客&#xff0c;写的真的很好的&#xff01; 代码随想录 LeetCode&#xff1a;63. 不同路径 II 给定一个 m x n 的整数数组 grid。一个机器人初始位于 左上角&#xff08;即 grid[0][0]…

索引的底层数据结构、B+树的结构、为什么InnoDB使用B+树而不是B树呢

索引的底层数据结构 MySQL中常用的是Hash索引和B树索引 Hash索引&#xff1a;基于哈希表实现的&#xff0c;查找速度非常快&#xff0c;但是由于哈希表的特性&#xff0c;不支持范围查找和排序&#xff0c;在MySQL中支持的哈希索引是自适应的&#xff0c;不能手动创建 B树的…

EigenLayer联合Cartesi:打造面向主流用户的DeFi、AI等新用例

EigenLayer 与 Cartesi 正在开展合作&#xff0c;致力于弥合基础设施协议与终端用户应用之间的鸿沟&#xff1b;鼓励核心开发人员构建人工智能代理、复杂 DeFi、游戏、社交网络等应用场景&#xff1b;得益于 Cartesi 基于 Linux 的协处理器&#xff0c;开发者可复用现有软件库和…

DeepSeek-R1论文研读:通过强化学习激励LLM中的推理能力

DeepSeek在朋友圈&#xff0c;媒体&#xff0c;霸屏了好长时间&#xff0c;春节期间&#xff0c;研读一下论文算是时下的回应。论文原址&#xff1a;[2501.12948] DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning 摘要&#xff1a; 我们…

MINIRAG: TOWARDS EXTREMELY SIMPLE RETRIEVAL-AUGMENTED GENERATION论文翻译

感谢阅读 注意不含评估以后的翻译原论文地址标题以及摘要介绍部分MiniRAG 框架2.1 HETEROGENEOUS GRAPH INDEXING WITH SMALL LANGUAGE MODELS2.2 LIGHTWEIGHT GRAPH-BASED KNOWLEDGE RETRIEVAL2.2.1 QUERY SEMANTIC MAPPING2.2.2 TOPOLOGY-ENHANCED GRAPH RETRIEVAL 注意不含评…

Kafka中文文档

文章来源&#xff1a;https://kafka.cadn.net.cn 什么是事件流式处理&#xff1f; 事件流是人体中枢神经系统的数字等价物。它是 为“永远在线”的世界奠定技术基础&#xff0c;在这个世界里&#xff0c;企业越来越多地使用软件定义 和 automated&#xff0c;而软件的用户更…

【学习笔记】深度学习网络-正则化方法

作者选择了由 Ian Goodfellow、Yoshua Bengio 和 Aaron Courville 三位大佬撰写的《Deep Learning》(人工智能领域的经典教程&#xff0c;深度学习领域研究生必读教材),开始深度学习领域学习&#xff0c;深入全面的理解深度学习的理论知识。 在之前的文章中介绍了深度学习中用…

Flutter常用Widget小部件

小部件Widget是一个类&#xff0c;按照继承方式&#xff0c;分为无状态的StatelessWidget和有状态的StatefulWidget。 这里先创建一个简单的无状态的Text小部件。 Text文本Widget 文件&#xff1a;lib/app/app.dart。 import package:flutter/material.dart;class App exte…

浅色可视化大屏虽然经常被诟病,也有自己的用武之地呀

一、视觉舒适性与减轻疲劳 在长时间的使用和观察中&#xff0c;浅色可视化大屏能够为用户带来更舒适的视觉体验&#xff0c;减轻视觉疲劳。与深色背景相比&#xff0c;浅色背景通常反射的光线较少&#xff0c;对眼睛的刺激相对较小。尤其是在需要长时间盯着大屏进行数据分析…

Office / WPS 公式、Mathtype 公式输入花体字、空心字

注&#xff1a;引文主要看注意事项。 1、Office / WPS 公式中字体转换 花体字 字体选择 “Eulid Math One” 空心字 字体选择 “Eulid Math Two” 使用空心字时&#xff0c;一般不用斜体&#xff0c;取消勾选 “斜体”。 2、Mathtype 公式输入花体字、空心字 2.1 直接输…

el-table组件样式如何二次修改?

文章目录 前言一、去除全选框按钮样式二、表头颜色的修改 前言 ElementUI中的组件el-table表格组件提供了丰富的样式&#xff0c;有一个全选框的el-table组件&#xff0c;提供了全选框和多选。 一、去除全选框按钮样式 原本默认是有全选框的。假如有一些开发者&#xff0c;因…

Python安居客二手小区数据爬取(2025年)

目录 2025年安居客二手小区数据爬取观察目标网页观察详情页数据准备工作&#xff1a;安装装备就像打游戏代码详解&#xff1a;每行代码都是你的小兵完整代码大放送爬取结果 2025年安居客二手小区数据爬取 这段时间需要爬取安居客二手小区数据&#xff0c;看了一下相关教程基本…

【13】WLC HA介绍和配置

1.概述 本文对AireOS WLC的HA进行介绍,和大多数网络架构设计一样,单台的WLC是无法保证设备的冗余性的,而且WLC也不是双引擎的设备,所以需要依靠High Available的技术来为WLC提供高可用性。 2.WLC HA类型 AireOS WLC的高可用性技术可以分为N+1的SSO的HA。不是所有的设备都…

因果推断与机器学习—用机器学习解决因果推断问题

Judea Pearl 将当前备受瞩目的机器学习研究戏谑地称为“仅限于曲线拟合”,然而,曲线拟合的实现绝非易事。机器学习模型在图像识别、语音识别、自然语言处理、蛋白质分子结构预测以及搜索推荐等多个领域均展现出显著的应用效果。 在因果推断任务中,在完成因果效应识别之后,需…

Hot100之矩阵

73矩阵置零 题目 思路解析 收集0位置所在的行和列 然后该行全部初始化为0 该列全部初始化为0 代码 class Solution {public void setZeroes(int[][] matrix) {int m matrix.length;int n matrix[0].length;List<Integer> list1 new ArrayList<>();List<…

【深度分析】DeepSeek大模型技术解析:从架构到应用的全面探索

深度与创新&#xff1a;AI领域的革新者 DeepSeek&#xff0c;这个由幻方量化创立的人工智能公司推出的一系列AI模型&#xff0c;不仅在技术架构上展现出了前所未有的突破&#xff0c;更在应用领域中开启了无限可能的大门。从其混合专家架构&#xff08;MoE&#xff09;到多头潜…

【VM】VirtualBox安装CentOS8虚拟机

阅读本文前&#xff0c;请先根据 VirtualBox软件安装教程 安装VirtualBox虚拟机软件。 1. 下载centos8系统iso镜像 可以去两个地方下载&#xff0c;推荐跟随本文的操作用阿里云的镜像 centos官网&#xff1a;https://www.centos.org/download/阿里云镜像&#xff1a;http://…

gentoo 中更改$PS1

现象&#xff1a;gentoo linux Xfce桌面&#xff0c;Terminal 终端&#xff0c;当进入很深的目录时&#xff0c;终端提示符会很长&#xff0c;不方便。如下图所示&#xff1a; 故需要修改$PS1 gentoo 默认的 PS1 在 /etc/bash/bashrc .d/10-gentoo-color.bash中定义&a…

【深度学习】DeepSeek模型介绍与部署

原文链接&#xff1a;DeepSeek-V3 1. 介绍 DeepSeek-V3&#xff0c;一个强大的混合专家 (MoE) 语言模型&#xff0c;拥有 671B 总参数&#xff0c;其中每个 token 激活 37B 参数。 为了实现高效推理和成本效益的训练&#xff0c;DeepSeek-V3 采用了多头潜在注意力 (MLA) 和 De…

攻防世界_simple_php

同类型题&#xff08;更难版->&#xff09;攻防世界_Web(easyphp)&#xff08;php代码审计/json格式/php弱类型匹配&#xff09; php代码审计 show_source(__FILE__)&#xff1a;show_source() 函数用于显示指定文件的源代码&#xff0c;并进行语法高亮显示。__FILE__ 是魔…