Hey guys, i need help creating a software reset in asm. The teacher said that forcing the CS and IP registers i could do it. I know that if CS+IP=0FFFFH, The processor goes to the reset point. Look what i did trying to reset it:

push CS
pop AX
mov BX,65535
sub bx,ax
call bx

After this CS+IP will be 0FFFFH, but i dont know what isnt working.
I would apreciatte any help.
Thanks.
Posted on 2003-11-02 22:28:27 by vandyke
warmboot....

B84000 mov ax,00040h
8ED8 mov ds,ax
C70672003412 mov w,[0072],01234h
EA0000FFFF jmp 0FFFFh:00000h

coldboot....

B84000 mov ax,00040h
8ED8 mov ds,ax
C70672000000 mov w,[0072],00000h
EA0000FFFF jmp 0FFFFh:00000h
Posted on 2003-11-02 22:43:23 by evlncrn8
I got a couple of errors. I dont know what could be the problem if u say that it works.

Turbo Assembler Version 2.01 Copyright (c) 1988, 1990 Borland International

Assembling file: reset.ASM
B84000 mov ax,00040h
**Error** reset.ASM(24) Illegal instruction
8ED8 mov ds,ax
**Error** reset.ASM(25) Illegal instruction
C70672003412 mov w,[0072],01234h
**Error** reset.ASM(26) Illegal instruction
EA0000FFFF jmp 0FFFFh:00000h
**Error** reset.ASM(27) Illegal instruction
Error messages: 4
Warning messages: None
Passes: 1
Remaining memory: 473k
Posted on 2003-11-03 10:56:43 by vandyke
Remove the hexa:

warmboot:

mov ax,00040h
mov ds,ax
mov word ptr [0072],01234h
jmp 0FFFFh:00000h

coldboot:

mov ax,00040h
mov ds,ax
mov word ptr [0072],00000h
jmp 0FFFFh:00000h


h.
Posted on 2003-11-03 11:01:08 by hitchhikr
I continue getting errors, look what did i get know:

Turbo Assembler Version 2.01 Copyright (c) 1988, 1990 Borland International

Assembling file: skelexe.ASM
mov word ptr [0072],01234h
**Error** skelexe.ASM(27) Illegal immediate
jmp 0FFFFh:00000h
**Error** skelexe.ASM(28) Near jump or call to different CS

Error messages: 2
Warning messages: None
Passes: 1
Remaining memory: 475k
Posted on 2003-11-03 12:18:07 by vandyke
Tasm 2 ???

Try this (it may work):

warmboot:

mov ax,00040h
mov ds,ax
mov ax,01234h
mov [0072],ax
jmp far 0FFFFh:00000h

coldboot:

mov ax,00040h
mov ds,ax
xor ax,ax
mov [0072],ax
jmp far 0FFFFh:00000h


or you can try to replace "jmp FAR 0FFFFh:00000h"
with:
db 0eah, 000h, 000h, 0ffh, 0ffh

It don't remember the old tasm syntax too clearly.

h.
Posted on 2003-11-03 12:31:34 by hitchhikr
Hi
Sorry if I'm pointing out the obvious, but hitchhikr didn't give you a full source, just a code snippet. If that's not all of your source then the problem must be somewhere else (the code seems fine to me). An alternative would be to get the A86 assembler for DOS, as it requires no "skeleton" (the code posted by hitchhikr would work as a full .com file).

A86 by Eric Isaacson

Hope it helps. :)
Posted on 2003-11-03 12:35:01 by QvasiModo