BBS: Inland Empire Archive Date: 04-08-92 (13:16) Number: 163 From: MARK BUTLER Refer#: 136 To: ABELARDO GARCES Recvd: NO Subj: Reboot With Qb Conf: (2) Quik_Bas
On 04-07-92 Abelardo Garces wrote to All... AG> Hello! AG> AG> I search how to entry a command for REBOOT the computer in QB45. AG> AG> Thanks! AG> AG> Abelardo Well Albelardo, I really don't know anything much about ASM -but- I picked these ASM routines up somewhere along the line and they seem to work very well. One routine will perform a warmboot (no memory count & check) the other will perform a simulated cold-boot (full reset with memory count & check). You can assemble them in this way... MASM WARMBOOT.ASM; <----- yields warmboot.obj ...and... MASM COLDBOOT.ASM; <----- yields coldboot.obj Or... if you have no assembler (such as MASM or TASM) then use the 2 debug scripts to recompile the objs like this... DEBUG < WARMBOOT.SCR DEBUG < COLDBOOT.SCR Your QB program will need these declarations at the beginning of the main module.... DECLARE SUB WARMBOOT () DECLARE SUB COLDBOOT () Link warmboot.obj and/or coldboot.obj into your finished QB program just like you would any other object file. Cut the following two ASM lists and the two debug scripts out to seperate files to use them. ----------------------8< CUT HERE 8<--------------------------------- title warmboot .model medium,basic .code Jmpf macro s,o db 0eah dw o dw s endm public warmboot warmboot proc far mov ax,0040h assume ds:nothing mov ds,ax mov ax,1234h mov ds:[0072h],ax jmpf 0f000h,0e05bh warmboot endp end warmboot ----------------------8< CUT HERE 8<--------------------------------- title coldboot .model medium,basic .code jmpf macro s,o db 0eah dw o dw s endm public coldboot coldboot proc far mov ax,0040h assume ds:nothing mov ds,ax mov ax,7f7fh mov ds:[0072h],ax jmpf 0f000h,0e05bh coldboot endp end coldboot ----------------------8< CUT HERE 8<--------------------------------- N WARMBOOT.OBJ E 0100 80 0E 00 0C 77 61 72 6D 62 6F 6F 74 2E 61 73 6D E 0110 8C 96 2D 00 00 05 5F 44 41 54 41 06 44 47 52 4F E 0120 55 50 0D 57 41 52 4D 42 4F 4F 54 5F 54 45 58 54 E 0130 05 5F 54 45 58 54 04 44 41 54 41 04 43 4F 44 45 E 0140 E6 98 07 00 48 00 00 05 07 01 0C 98 07 00 48 00 E 0150 00 02 06 01 10 98 07 00 48 10 00 04 07 01 FD 9A E 0160 04 00 03 FF 02 5E 90 0F 00 00 03 08 57 41 52 4D E 0170 42 4F 4F 54 00 00 00 EB A0 14 00 03 00 00 B8 40 E 0180 00 8E D8 B8 34 12 A3 72 00 EA 5B E0 00 F0 C3 8A E 0190 06 00 C1 50 03 00 00 5C RCX 0098 W Q ----------------------8< CUT HERE 8<--------------------------------- N COLDBOOT.OBJ E 0100 80 0E 00 0C 63 6F 6C 64 62 6F 6F 74 2E 61 73 6D E 0110 A1 96 2D 00 00 0D 43 4F 4C 44 42 4F 4F 54 5F 54 E 0120 45 58 54 05 5F 44 41 54 41 06 44 47 52 4F 55 50 E 0130 05 5F 54 45 58 54 04 44 41 54 41 04 43 4F 44 45 E 0140 FB 98 07 00 48 00 00 05 07 01 0C 98 07 00 48 00 E 0150 00 03 06 01 0F 98 07 00 48 10 00 02 07 01 FF 9A E 0160 04 00 04 FF 02 5D 90 0F 00 00 03 08 43 4F 4C 44 E 0170 42 4F 4F 54 00 00 00 00 A0 14 00 03 00 00 B8 40 E 0180 00 8E D8 B8 7F 7F A3 72 00 EA 5B E0 00 F0 0B 8A E 0190 06 00 C1 50 03 00 00 5C RCX 0098 W Q ----------------------8< CUT HERE 8<--------------------------------- Hope this helps.... ----------> MHB :-) ... OFFLINE 1.36 * Never sleep with anyone crazier than yourself. --- DB B1064/001271 * Origin: * Bare Bones BBS * (1:105/360)
Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET