我写的数据库操作类DBUtil


package org.evilbinary.db;
import java.sql.*;
import java.util.Vector;

public class DBUtil {
	private String userName;
	private String password;
	private String connectUrl;
	private String driverName;
	private Statement statement;
	private PreparedStatement preparedStatement;
	private Connection connection;
	private ResultSet resultSet;
	private CallableStatement callStatement;
	public DBUtil(){
		driverName="com.mysql.jdbc.Driver";
		connectUrl="jdbc:mysql://localhost:3306/oj";
		userName="root";
		password="123";
		connect();
	}
	public DBUtil(String connectUrl,String userName,String password){
        
    

redhat编译bochs

linux 安装上了,下载了一个Bochs版本 bochs-2.4.2-1.i586 结果安装时候依赖文件没找到,提示如下:


Downloading Packages:
Running rpm_check_debug
ERROR with rpm_check_debug vs depsolve:
rpmlib(PayloadIsLzma) is needed by bochs-2.4.2-1.i586
Complete!
yum提示找不到依赖文件,火大,直接下载源代码,,bochs-2.4.6-1.src.rpm,重新生成rpm包:

rpm –ivh bochs-2.4.6-1.src.rpm
cd /usr/src/redhat/SPECS
rpmbuild –bb bochs.spec
这个步骤等了好久,结果出错了,信息如下

36% [=========>                  ] 551,283     12.3K/s  eta 85s     wget: progress.c:922: create_image: Assertion `insz <= dlsz' failed.
make: *** [dlxlinux4.tar.gz] Aborted
make: *** Dele
        
    

setup.bin进入保护模式

一段存代码,没有任何注释,我也忘记了。功能是:初始化进入保护模式,检测内存,并分页,加载内核,跳转到kernel.bin执行kernel是elf格式的。


%include "pm.inc"
    org 1000h
    jmp start
    
    sectnum  dw  19
sectnum1 db 1
init_kernel_ofs dw  0000h
init_kernel_seg dw  8000h
FATOFS  dw  0000h
    FATSEG  dw  9000h
fatnum dw 9
fatnumcount dw 1
    fatentry dw 200h
    filename db  'KERNEL  BIN'
kernel_msg:   db  "Loading kernel"
nofound_msg: db  "No kernel."
    ready:   db  "Ready."
    
    ;descriptor limitl basel basem attrib baseh
    ;	  dw    dw    db     dw    db
gdt:
    null_des: descriptor  0,0,0,0,0
    code_des: descriptor 0ffffh,0,0,attrib_ce+at
        
    

boot引导程序

boot引导程序

org 07c00h
boot:
jmp begine
nop
BS_OEMName db 'cty1234'
BPB_BytsPerSec dw 512
BPB_SecPerClus  db 1
BPB_RsvdSecCnt  dw 1
BPB_NumFATs	 db 2
BPB_RootEntCnt	 dw 224
BPB_TotSec16	 dw 2880
    BPB_Media	 db 0F0h
    BPB_FAT16	 dw 9
    BPB_SecPerTrk	 dw 18	 ; 每磁道扇区数
BPB_NumHeads	 dw 2	 ; 磁头数(面数)
BPB_HiddSec	 dd 0	 ; 隐藏扇区数
BPB_TotSec32	 dd 0	 ; 如果 wTotalSectorCount 是 0 由这个值记录扇区数
BS_DrvNum	 db 0	 ; 中断 13 的驱动器号
BS_Reserved1	 db 0	 ; 未使用
BS_BootSig	     db 29h	 ; 扩展引导标记 (29h)
BS_VolID	     dd 0	 ; 卷序列号
BS_VolLab	     db 'evilbinary '; 卷标, 必须 11 个字节
BS_FileSysType	 db 'FAT12   '
   INITOFS dw  1