自制虚拟机(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:
运行成功!
相关文章:
自制虚拟机(C/C++)(二、分析引导扇区,虚拟机读二进制文件img软盘)
先修复上一次的bug,添加新指令,并增加图形界面 #include <graphics.h> #include <conio.h> #include <windows.h> #include <commdlg.h> #include <iostream> #include <fstream> #include <sstream> #inclu…...
S4 HANA给科目分配允许记账的税码
本文主要介绍在S4 HANA OP中给科目分配允许记账的税码相关设置。具体请参照如下内容: 1. 给科目分配允许记账的税码 以上配置定义了总账科目可以使用什么税码进行记账。通常在科目主数据中会明确总账科目的“Tax Category”来请明确总账科目可以使用什么类型的税码…...
【LeetCode 刷题】回溯算法-组合问题
此博客为《代码随想录》二叉树章节的学习笔记,主要内容为回溯算法组合问题相关的题目解析。 文章目录 77. 组合216.组合总和III17.电话号码的字母组合39. 组合总和40. 组合总和 II 77. 组合 题目链接 class Solution:def combinationSum3(self, k: int, n: int) …...
Automatic Prefix Caching
APC技术,遇到新prompt和老prompt前缀完全相等的,则复用老prompt的KV cache,避免重新计算。 VLLM代码实例: # set enable_prefix_cachingTrue to enable APC llm LLM(modellmsys/longchat-13b-16k,enable_prefix_cachingTrue ) 应…...
DDD - 领域事件_解耦微服务的关键
文章目录 Pre领域事件的核心概念领域事件的作用领域事件的识别领域事件的技术实现领域事件的运行机制案例领域事件驱动的优势 Pre DDD - 微服务设计与领域驱动设计实战(中)_ 解决微服务拆分难题 EDA - Spring Boot构建基于事件驱动的消息系统 领域事件的核心概念 领域事件&a…...
吴晓波 历代经济变革得失@简明“中国经济史” - 读书笔记
目录 《历代经济变革得失》读书笔记一、核心观点二、主要内容(一)导论(二)春秋战国时期(三)汉代(四)北宋(五)明清时期(六)近现代&…...
Ubuntu下的Doxygen+VScode实现C/C++接口文档自动生成
Ubuntu下的DoxygenVScode实现C/C接口文档自动生成 Chapter1 Ubuntu下的DoxygenVScode实现C/C接口文档自动生成1、 Doxygen简介1. 安装Doxygen1)方法一:2)方法二:2. doxygen注释自动生成插件3. doxygen注释基本语法4. doxygen的生成…...
论文阅读:Realistic Noise Synthesis with Diffusion Models
这篇文章是 2025 AAAI 的一篇工作,主要介绍的是用扩散模型实现对真实噪声的仿真模拟 Abstract 深度去噪模型需要大量来自现实世界的训练数据,而获取这些数据颇具挑战性。当前的噪声合成技术难以准确模拟复杂的噪声分布。我们提出一种新颖的逼真噪声合成…...
【Linux系统】计算机世界的基石:冯诺依曼架构与操作系统设计
文章目录 一.冯诺依曼体系结构1.1 为什么体系结构中要存在内存?1.2 冯诺依曼瓶颈 二.操作系统2.1 设计目的2.2 系统调用与库函数 一.冯诺依曼体系结构 冯诺依曼体系结构(Von Neumann Architecture)是计算机的基本设计理念之一,由…...
p1044 栈
两种递推细节不同 1,将1和n在序列末尾的情况单独放出来处理,因为dp[0]0; 2,将所有情况统一处理,这种情况就要要求dp[1]1; 这里的n在解题中可以看做是元素数量 思路是,根据出栈最后一个元素,统计它前面的元素数量的输出序列数和…...
x86-64数据传输指令
关于汇编语言一些基础概念的更详细的介绍,可移步MIPS指令集(一)基本操作_mips指令 sw-CSDN博客 该指令集中一个字2字节。 该架构有16个64位寄存器,名字都以%r开头,每个寄存器的最低位字节,低1~2位字节&…...
C++11新特性之lambda表达式
1.介绍 C11引入了lambda表达式。lambda表达式提供一种简洁的方式来定义匿名函数对象,使得在需要临时定义一个函数时非常方便。 2.lambda表达式用法 lambda表达式的基本用法为: [捕获列表](参数列表)->返回类型 { 函数体 …...
51单片机密码锁代码
基于液晶屏外设写的. main.c #include <REGX52.H> #include "LCD1602.h" #include "MatrixKey.h" #include "Sleep.h" long password1234; long resNum0; int status0,res0,k1500; long birth2005; void main(){LCD_Init();LCD_ShowStr…...
如何使用C#的using语句释放资源?什么是IDisposable接口?与垃圾回收有什么关系?
在 C# 中,using语句用于自动释放实现了IDisposable接口的对象所占用的非托管资源,如文件句柄、数据库连接、图形句柄等。其使用方式如下: 基础用法 声明并初始化资源对象:在using关键字后的括号内声明并初始化一个实现了IDisposable接口的对象。使用资源:在using语句块内…...
【Unity3D】实现横版2D游戏——单向平台(简易版)
目录 问题 项目Demo直接使用免费资源:Hero Knight - Pixel Art (Asset Store搜索) 打开Demo场景,进行如下修改,注意Tag是自定义标签SingleDirCollider using System.Collections; using System.Collections.Generic;…...
BW AO/工作簿权限配置
场景: 按事业部配置工作簿权限; 1、创建用户 事务码:SU01,用户主数据的维护,可以创建、修改、删除、锁定、解锁、修改密码等 用户设置详情页 2、创建权限角色 用户的权限菜单是通过权限角色分配来实现的 2.1、自定…...
TensorFlow 示例摄氏度到华氏度的转换(一)
TensorFlow 实现神经网络模型来进行摄氏度到华氏度的转换,可以将其作为一个回归问题来处理。我们可以通过神经网络来拟合这个简单的转换公式。 1. 数据准备与预处理 2. 构建模型 3. 编译模型 4. 训练模型 5. 评估模型 6. 模型应用与预测 7. 保存与加载模型 …...
一文讲解JVM中的G1垃圾收集器
接上一篇博文,这篇博文讲下JVM中的G1垃圾收集器 G1在JDK1.7时引入,在JDK9时取代了CMS成为默认的垃圾收集器; G1把Java堆划分为多个大小相等的独立区域Region,每个区域都可以扮演新生代(Eden和Survivor)或老…...
图书管理系统 Axios 源码__获取图书列表
目录 核心功能 源码介绍 1. 获取图书列表 技术要点 适用人群 本项目是一个基于 HTML Bootstrap JavaScript Axios 开发的图书管理系统,可用于 添加、编辑、删除和管理图书信息,适合前端开发者学习 前端交互设计、Axios 数据请求 以及 Bootstrap 样…...
mac和linux传输文件
1、使用scp命令传输 # 上传 wenqiangwq ~ % scp -pr -P 22 nginx.yaml root192.168.1.15:/tmp/ root192.168.1.15s password: nginx.yaml 100% 1736 332.4KB/s 00:00# 下载 wenqiangwq ~ % scp -pr -P 22 root192.168.1.15:/tmp/ngin…...
[CVPR 2024] AnyDoor: Zero-shot Object-level Image Customization
github.com/ali-vilab/AnyDoor.写在前面: 【论文速读】按照#论文十问#提炼出论文核心知识点,方便相关科研工作者快速掌握论文内容。过程中并不对论文相关内容进行翻译。博主认为翻译难免会损坏论文的原本含义,也鼓励诸位入门级科研人员阅读文…...
(动态规划路径基础 最小路径和)leetcode 64
视频教程 1.初始化dp数组,初始化边界 2、从[1行到n-1行][1列到m-1列]依次赋值 #include<vector> #include<algorithm> #include <iostream>using namespace std; int main() {vector<vector<int>> grid { {1,3,1},{1,5,1},{4,2,1}…...
跨组织环境下 MQTT 桥接架构的评估
论文标题 中文标题: 跨组织环境下 MQTT 桥接架构的评估 英文标题: Evaluation of MQTT Bridge Architectures in a Cross-Organizational Context 作者信息 Keila Lima, Tosin Daniel Oyetoyan, Rogardt Heldal, Wilhelm Hasselbring Western Norway …...
2025年1月22日(网络编程 udp)
系统信息: ubuntu 16.04LTS Raspberry Pi Zero 2W 系统版本: 2024-10-22-raspios-bullseye-armhf Python 版本:Python 3.9.2 已安装 pip3 支持拍摄 1080p 30 (1092*1080), 720p 60 (1280*720), 60/90 (640*480) 已安装 vim 已安装 git 学习…...
基于 STM32 的智能电梯控制系统
1. 引言 随着城市化进程的加速,高层建筑日益增多,电梯作为垂直交通工具的重要性愈发凸显。传统电梯控制系统在运行效率、安全性和智能化程度上已难以满足现代需求。智能电梯控制系统能够实时监测电梯的运行状态、乘客需求,并根据这些信息优化…...
使用 Docker(Podman) 部署 MongoDB 数据库及使用详解
在现代开发环境中,容器化技术(如 Docker 和 Podman)已成为部署和管理应用程序的标准方式。本文将详细介绍如何使用 Podman/Docker 部署 MongoDB 数据库,并确保其他应用程序容器能够通过 Docker 网络成功连接到 MongoDB。我们将逐步…...
npm 和 pip 安装中常见问题总结
安装路径的疑惑:NPM 和 PIP 的安装机制 NPM 安装路径规则: 依赖安装在项目目录下: 当你运行 npm install --save-dev jest,它会在当前目录(例如 F:\)下创建一个 node_modules 文件夹,把 jest 安…...
golang面试题
目录 go版本新增功能 Go 1.11 Go 1.18 Go 1.5 go关键字 : 1. 用于声明的关键字 2. 控制流关键字 3. 包相关关键字 4. 并发相关关键字 5. 异常处理关键字 6. 接口和类型断言关键字 go数据类型: 复合数据类型 引用数据类型 接口类型 GC垃…...
基于UKF-IMM无迹卡尔曼滤波与交互式多模型的轨迹跟踪算法matlab仿真,对比EKF-IMM和UKF
目录 1.程序功能描述 2.测试软件版本以及运行结果展示 3.核心程序 4.本算法原理 5.完整程序 1.程序功能描述 基于UKF-IMM无迹卡尔曼滤波与交互式多模型的轨迹跟踪算法matlab仿真,对比EKF-IMM和UKF。 2.测试软件版本以及运行结果展示 MATLAB2022A版本运行 3.核心程序 .…...
Install Python
目录 1.Install Python 1.安装Python 3 2.在Windows上安装Python 3.在Mac上安装Python 4.在Linux上安装Python 5.运行Python 2.Python解释器 1.CPython 2.IPython 3.PyPy 4.Jython 5.IronPython 6.小结 1.Install Python 因为Python是跨平台的,它可以…...
云计算部署模式全面解析
目录 引言公有云私有云混合云三种部署模式的对比选择建议未来趋势结语 1. 引言 随着云计算技术的快速发展,企业在选择云部署模式时面临着多种选择。本文将深入探讨云计算的三种主要部署模式:公有云、私有云和混合云,帮助读者全面了解它们的特点、优势及适用场景。 © iv…...
tomcat核心组件及原理概述
目录 1. tomcat概述 1.1 概念 1.2 官网地址 2. 基本使用 2.1下载 3. 整体架构 3.1 核心组件 3.2 从web.xml配置和模块对应角度 3.3 如何处理请求 4. 配置JVM参数 5. 附录 1. tomcat概述 1.1 概念 什么是tomcat Tomcat是一个开源、免费、轻量级的Web服务器。 Tomca…...
GIS教程:全国数码商城系统
文章目录 注册高德地图API普通网页中测试地图加载地图添加标记地图配置点标记 Marker添加弹框创建vue项目并添加高德地图创建项目加载高德地图项目首页布局封装axios和配置代理服务器获取城市热门信息获取城市区县信息获取区县商城信息获取指定城市区县的经纬度坐标将地图缩放到…...
Level DB --- table.format
table.format是Level DB中table序列化、反序列化重要的辅助类。它用来定义序列化、反序列化的核心结构体和操作实现。 BlockHandle table.format中的BlockHandle类主要用来记录当前block在总的序列化中的offset位置,以及当前block的size,这里面的Block…...
《编写可读代码的艺术》读书笔记
1. 写在前面 借着春节放假的几天, 读了下《编写可读代码的艺术》这本书, 这本书不是很长,主要关注代码的一些编写细节,比如方法命名,函数命名,语句组织,任务分解等, 旨在让写的代码…...
(9)下:学习与验证 linux 里的 epoll 对象里的 EPOLLIN、 EPOLLHUP 与 EPOLLRDHUP 的不同。小例子的实验
(4)本实验代码的蓝本,是伊圣雨老师里的课本里的代码,略加改动而来的。 以下是 服务器端的代码: 每当收到客户端的报文时,就测试一下对应的 epoll 事件里的事件标志,不读取报文内容,…...
MySQL基础-多表查询
多表查询-多表关系 多表查询-概述 例如执行下行sql语句就会出现笛卡尔积: select *from emp,dept; --消除笛卡尔积 select * from emp,dept where emp.dept_id dept.id; 多表查询-查询分类 多表查询-连接查询-内连接 --内连接演示 --1.查询每一个员工的姓名,及关…...
RK3568 opencv播放视频
文章目录 一、opencv相关视频播放类1. `cv::VideoCapture` 类主要构造方法:主要方法:2. 视频播放基本流程代码示例:3. 获取和设置视频属性4. 结合 FFmpeg 使用5. OpenCV 视频播放的局限性6. 结合 Qt 实现更高级的视频播放总结二、QT中的代码实现一、opencv相关视频播放类 在…...
C++中的类型转换
文章目录 一、概述二、隐式类型转换(Implicit Conversion)三、显式类型转换(Explicit Conversion)四、C 风格类型转换 一、概述 C 提供了多种类型转换(Type Conversion)方式,以便在不同类型的数…...
day7手机拍照装备
对焦对不上:1、光太暗;2、离太近;3、颜色太单一没有区分点 滤镜可以后期P 渐变灰滤镜:均衡色彩,暗的地方亮一些,亮的地方暗一些 中灰滤镜:减少光差 手机支架:最基本70cm即可 手…...
Joplin 插件在Vscode中无法显示图片
1.问题 在vscode里面装好joplin插件之后,无法显示图片内容。 粘贴的图片可以再vscode中显示,无法再joplin客户端显示 2.解决方法 这种情况是因为和vscode自带的MD编辑器的预览模式有冲突,或者没用通过专用方式上传图片。 方法一ÿ…...
ReentrantReadWriteLock源码分析
文章目录 概述一、状态位设计二、读锁三、锁降级机制四、写锁总结 概述 ReentrantReadWriteLock(读写锁)是对于ReentranLock(可重入锁)的一种改进,在可重入锁的基础上,进行了读写分离。适用于读多写少的场景…...
ChatGPT-4o和ChatGPT-4o mini的差异点
在人工智能领域,OpenAI再次引领创新潮流,近日正式发布了其最新模型——ChatGPT-4o及其经济实惠的小型版本ChatGPT-4o Mini。这两款模型虽同属于ChatGPT系列,但在性能、应用场景及成本上展现出显著的差异。本文将通过图文并茂的方式࿰…...
小程序设计和开发:什么是竞品分析,如何进行竞品分析
一、竞品分析的定义 竞品分析是指对竞争对手的产品进行深入研究和比较,以了解市场动态、发现自身产品的优势和不足,并为产品的设计、开发和营销策略提供参考依据。在小程序设计和开发中,竞品分析可以帮助开发者了解同类型小程序的功能、用户体…...
计算机网络之计算机网络的分类
计算机网络可以根据不同的角度进行分类,以下是几种常见的分类方式: 1. 按照规模和范围: 局域网(LAN,Local Area Network):覆盖较小范围(例如一个建筑物或校园)…...
什么是门控循环单元?
一、概念 门控循环单元(Gated Recurrent Unit,GRU)是一种改进的循环神经网络(RNN),由Cho等人在2014年提出。GRU是LSTM的简化版本,通过减少门的数量和简化结构,保留了LSTM的长时间依赖…...
ESP32-c3实现获取土壤湿度(ADC模拟量)
1硬件实物图 2引脚定义 3使用说明 4实例代码 // 定义土壤湿度传感器连接的模拟输入引脚 const int soilMoisturePin 2; // 假设连接到GPIO2void setup() {// 初始化串口通信Serial.begin(115200); }void loop() {// 读取土壤湿度传感器的模拟值int sensorValue analogRead…...
获取snmp oid的小方法1(随手记)
snmpwalk遍历设备的mib # snmpwalk -v <SNMP version> -c <community-id> <IP> . snmpwalk -v 2c -c test 192.168.100.201 .根据获取的值,找到某一个想要的值的oid # SNMPv2-MIB::sysName.0 STRING: test1 [rootzabbix01 fonts]# snmpwalk -v…...
【C++篇】哈希表
目录 一,哈希概念 1.1,直接定址法 1.2,哈希冲突 1.3,负载因子 二,哈希函数 2.1,除法散列法 /除留余数法 2.2,乘法散列法 2.3,全域散列法 三,处理哈希冲突 3.1&…...
Nginx开发01:基础配置
一、下载和启动 1.下载、使用命令行启动:Web开发:web服务器-Nginx的基础介绍(含AI文稿)_nginx作为web服务器,可以承担哪些基本任务-CSDN博客 注意:我配置的端口是81 2.测试连接是否正常 访问Welcome to nginx! 如果…...