flat assembler
Message board for the users of flat assembler.

Index > OS Construction > OS independent Debug util?

Author
Thread Post new topic Reply to topic
me239



Joined: 06 Jan 2011
Posts: 200
me239 29 Aug 2011, 04:54
Hey guys, I was searching around the internet for an OS independent version of MS Debug or just a simple Hex interpreter. If anyone knows of one or has made their own, please share Smile
Post 29 Aug 2011, 04:54
View user's profile Send private message Reply with quote
me239



Joined: 06 Jan 2011
Posts: 200
me239 29 Aug 2011, 05:36
UPDATE!: Silly me, I just wrote my own hex interpreter here is the code
Code:
org 100h
start:
        mov     ah, 0eh
        mov     al, '>'
        int     10h
        mov     di, buff
        call    getinput
        mov     si, buff
        call    interpret
        mov     ax, 0e0dh
        int     10h
        mov     al, 0ah
        int     10h
        jmp     start
getinput:
        xor     cx, cx
inploop:
        xor     ax, ax
        int     16h
        cmp     al, 0dh
        jz      entered
        cmp     al, 08h
        jz      bkspace
        cmp     al, 60h
        jb      @f
        sub     al, 20h
@@:
        stosb
        mov     ah, 0eh
        int     10h
        inc     cx
        jmp     inploop
entered:   
        stosb
        ret
bkspace:
        cmp     cx, 0
        jz      inploop
        dec     cx
        dec     di
        mov     byte[di], 0
        mov     ax, 0e08h
        int     10h
        mov     al, 0
        int     10h
        mov     al, 08h
        int     10h
        jmp     inploop
interpret:
        lodsb
        cmp     al, 'G'
        jz      progexec
        cmp     al, 'Q'
        jz      quit
        cmp     al, 0dh
        jz      endfound
        cmp     al, 20h
        jz      interpret
        cmp     al, ','
        jz      commafound
        lodsb
commafound:
        lodsb
        cmp     al, 20h
        jz      interpret
@@:
        cmp al, ','
        jz convhex
        cmp al, 0dh
        jz  convhex
        lodsb
        jmp @b
convhex: 
        sub si, 3
        lodsw
        mov bx, ax
        sub bx, 0101h
        and bx, 0x4040
        shr bx, 6
        imul bx, 7
        sub ax, bx
        sub ax, 0x3030
        shl ah, 4
        rol ax, 4
        mov di, progspace
        add di, word[counter]
        stosb
        inc word[counter]
        jmp interpret
endfound:
        ret 
quit:
        int     20h
progexec:
        mov     ax, 0x1020
        mov     es, ax
        xor     di, di
        mov     cx, counter-progspace
        mov     si, progspace
        rep     movsb
        sub     ax, 10h
        mov     ds, ax
        cli
        mov     ss, ax
        xor     sp, sp
        sti
        push    0x1010
        push    0x0100
        retf
progspace:
db 500 dup (?)
ret
counter dw  0
buff    db      500 dup (0)
    
Post 29 Aug 2011, 05:36
View user's profile Send private message Reply with quote
nop



Joined: 01 Sep 2008
Posts: 165
Location: right here left there
nop 03 Sep 2011, 04:11
me239 wrote:
UPDATE!: Silly me, I just wrote my own hex interpreter here is the code
you mean silly me239 hahaha
Post 03 Sep 2011, 04:11
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 05 Sep 2011, 16:45
nop
Post 05 Sep 2011, 16:45
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
smiddy



Joined: 31 Oct 2004
Posts: 557
smiddy 07 Oct 2011, 18:15
I have often pondered doing a processor specific DEBUG. There is or was a DEBUG out there a gentleman wrote that could get you started, but I can't recall the name of it. It ran on top of DOS, but all the code was there and was 32 bit too. I will have to look at my archives when I get home this evening. I'll post the name this evening, maybe it will help.
Post 07 Oct 2011, 18:15
View user's profile Send private message Reply with quote
nop



Joined: 01 Sep 2008
Posts: 165
Location: right here left there
nop 11 Oct 2011, 20:29
Madis731 wrote:
nop
Madis731
Post 11 Oct 2011, 20:29
View user's profile Send private message Reply with quote
nop



Joined: 01 Sep 2008
Posts: 165
Location: right here left there
nop 11 Oct 2011, 20:31
smiddy wrote:
I'll post the name this evening, maybe it will help.
smiddy?
Post 11 Oct 2011, 20:31
View user's profile Send private message Reply with quote
smiddy



Joined: 31 Oct 2004
Posts: 557
smiddy 14 Oct 2011, 17:28
Sorry, I got distracted. I will send myself a note at home to look through my archives. I can't seem to find a link on the net.
Post 14 Oct 2011, 17:28
View user's profile Send private message Reply with quote
smiddy



Joined: 31 Oct 2004
Posts: 557
smiddy 14 Oct 2011, 17:44
Ok, I found it: http://members.tripod.com/~ladsoft/dos/grdbdl96.zip Get Real DEBUGGER IIRC, you can convert it fairly easily with FASM and then embed it into your own OS. I hope this helps.
Post 14 Oct 2011, 17:44
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.