Return to BSD News archive
Newsgroups: comp.os.386bsd.questions Path: sserve!newshost.anu.edu.au!munnari.oz.au!sgiblab!sdd.hp.com!col.hp.com!csn!boulder!cnsnews!spot.Colorado.EDU!frechett From: frechett@spot.Colorado.EDU (-=Runaway Daemon=-) Subject: Hacking boot block assm for 50 display lines. (netbsd) Message-ID: <CIoD8p.4Fp@cnsnews.Colorado.EDU> Sender: usenet@cnsnews.Colorado.EDU (Net News Administrator) Nntp-Posting-Host: spot.colorado.edu Organization: University of Colorado, Boulder Date: Mon, 27 Dec 1993 03:48:25 GMT Lines: 59 I'm starting to wonder if any of my questions are getting out as the responces appear to be quite underwhelming, but since this is the closest thing to netbsd support I can find, I'll ask again. I'm trying to do two things upon boot. 1. Set the display to 50 lines or what is known as "Extended VGA mode 80x50" 2. set the repeat rate as high as it'll go (32 chars a sec I believe) in dos the equiv is mode con:lines=50 rate=32 delay=1 In Linux you disable the video mode in the kernel conf, reboot and it asks you which display mode you want and linux also assumes you want the fastest repeat at all times. In linux this is handled in a couple chunks of pure intel assembly code in a file called setup.S, before it goes into protected mode. I'd like to accomplish the same thing in netbsd so I started hacking the files bios.S and boot.c in src/sys/arch/i386/boot For a simple test I took the code from the linux setut.S file ! set the keyboard repeat rate to the max mov ax,#0x0305 xor bx,bx ! clear bx int 0x16 I created a function in bios.S building from putc() and getc() to save the registers and so on. I'm pretty sure I got that bit right. I call prot_to_real and then did something like this mov $0x0305, %eax xor %ebx,%ebx int $0x16 And then jump back to protected mode like all the other functions in bios.S do. I then placed a call to this whole function right at the top of boot.c before it gets the memory stats for the machine. Needless to say, it doesn't work. With a few slight changes I managed to get it into a reboot loop, or to just freeze up, or simply ignore the call, as it's doing now. The problem is that I'm not familiar with this assembly syntax at all. It's unlike intel or 68k assembly. It's close to PDP-11 assembly but the pdp-11 uses #number among other things and the register names are all different of course. So, my basic question is as follows: How do I translate the above intel assembly into this assembly code for netbsd in the bios.S context? I need everything from the prot_to_real through to real_to_prot. Secondly, where is the best place in boot.c to place a call to my setup function? I think putting it at the top may be bad, but I'm unsure where it's safe to keep jumping in and out of real mode. Where do I find more info on this assembler syntax? What's it called? ian