** 说明,当我说是会间方案时,我不说是把一名顾问召集在一起的方案。 我指的是,一个简单的方案,在你开始计算机并做一些事情时运行。
右手,那么我就没有在议会/全国人民军中广为宣传的
Well, I thought 我的感受非常好。 显然没有。
我在网上尝试了一个简单的boot方案。 罚款(英文字母A)。 然后,我修改了这封信,以印制一份储存在记忆中的信件。 它失败了;它不印刷A,而是印刷了微笑。 (我穿戴,现在用电脑ugh。)
这是来文方档案中的法典:
[BITS 16] ; We start up in 16-bit real mode
[ORG 0x7C00] ; We re booted into memory at this address. (Or so I m told)
mov ah, 0x0E ; Teletype command
mov bh, 0x00 ; Page number
mov bl, 0x07 ; Attributes (7 == white foreground, black background)
mov al, [testChar] ; Character to print; load it from the memory referenced by testChar.
int 0x10 ; Tell the BIOS to execute the teletype command.
jmp $ ; Infinite loop prevents us from going off and executing the other junk in memory
testChar db 65 ; This is the character we want to print. A .
; The following code pads the rest of the outputted binary file
; and concludes it with the bootloader signature so I don t have
; to do so manually.
times 510-($-$$) db 0
dw 0xAA55
If I replace move al, [testChar] with move al, 65 , the letter A is printed correctly. I ve tried moving the memory declaration around, I ve tried every combination of brackets or no brackets around BITS and ORG, and I ve tried incrementing and decrementing testChar (i.e. [testChar+1]). Every time, it prints either a smiley, an inverse smiley (when I increment testChar), or nothing at all (when I put the memory declaration before the code, probably because no code is being executed =P). I can t get the damn thing to work.
如今,对于规格(由于其可能具有相关性):
I m与一家英特尔Pentium II处理器操作一个Dell Latitude CPi,因为所有I ve都不得不测试(I m不用正常计算机测试组装)。 页: 1 I m pretty 我相信,处理器是x86,因为I ve跑道是Windows XP、Utub和Archit。
I m目前使用国家宇宙航行局撰写和汇编关于海底含水层的方案。
boot方案由一盘软盘操作。
I use nasm -f bin FILENAME to codification the Code.
然后,我利用马托醇一揽子计划对AL的模拟指挥,通过<>mformat-f 1440-B BOOTPROGRAM A:将所编的boot方案转至一盘.。
So, what did I screw up this time? Or is it a problem with my processor/BIOS?