flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > OS independent Debug util? |
Author |
|
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) |
|||
29 Aug 2011, 05:36 |
|
nop 03 Sep 2011, 04:11
me239 wrote: UPDATE!: Silly me, I just wrote my own hex interpreter here is the code |
|||
03 Sep 2011, 04:11 |
|
Madis731 05 Sep 2011, 16:45
nop
|
|||
05 Sep 2011, 16:45 |
|
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.
|
|||
07 Oct 2011, 18:15 |
|
nop 11 Oct 2011, 20:29
Madis731 wrote: nop |
|||
11 Oct 2011, 20:29 |
|
nop 11 Oct 2011, 20:31
smiddy wrote: I'll post the name this evening, maybe it will help. |
|||
11 Oct 2011, 20:31 |
|
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.
|
|||
14 Oct 2011, 17:28 |
|
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.
|
|||
14 Oct 2011, 17:44 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.