flat assembler
Message board for the users of flat assembler.

Index > OS Construction > seg off printing

Author
Thread Post new topic Reply to topic
GhostXoPCorp



Joined: 13 Dec 2008
Posts: 199
Location: 01F0:0100
GhostXoPCorp 11 Jun 2009, 19:54
i am making an error handler for my os for invalid opcodes and div by ,
can anyone show me or point me to a cite that prints your seg:offset at error
this may not be useful as the error will not halt the os but i just want to make it for the program crash handler. can anyone help

_________________
Oh that divide overflow. Just jumps out of the bushes every time to scare the day lights out of me.
Post 11 Jun 2009, 19:54
View user's profile Send private message Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2465
Location: Bucharest, Romania
Borsuc 12 Jun 2009, 01:02
You'll have to convert them to ASCII first. That's usually a generic function, search around I'm sure you'll find (sorry it's 4 AM I can't give you code now Sad).

_________________
Previously known as The_Grey_Beast
Post 12 Jun 2009, 01:02
View user's profile Send private message Reply with quote
windwakr



Joined: 30 Jun 2004
Posts: 827
windwakr 12 Jun 2009, 02:14
Theres a routine here you could study that converts hex number to ascii and prints, its written by Thimis.

_________________
----> * <---- My star, won HERE
Post 12 Jun 2009, 02:14
View user's profile Send private message Reply with quote
GhostXoPCorp



Joined: 13 Dec 2008
Posts: 199
Location: 01F0:0100
GhostXoPCorp 12 Jun 2009, 02:27
Borsuc: you dont have to give me code
windwakr: thanks

_________________
Oh that divide overflow. Just jumps out of the bushes every time to scare the day lights out of me.
Post 12 Jun 2009, 02:27
View user's profile Send private message Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 12 Jun 2009, 04:35
To unpack PBCD into ASCII and print it...

Code:
PrintPBCD:
; AL = PBCD
        mov   ah,al
        and   ax,0xF00F
        shr   ah,4
        or    ax,0x3030
        xchg  al,ah
        call  PrintChar ; prints char in AL
        xchg  al,ah
        call  PrintChar
        ret
    

_________________
Coding a 3D game engine with fasm is like trying to eat an elephant,
you just have to keep focused and take it one 'byte' at a time.
Post 12 Jun 2009, 04:35
View user's profile Send private message Reply with quote
GhostXoPCorp



Joined: 13 Dec 2008
Posts: 199
Location: 01F0:0100
GhostXoPCorp 12 Jun 2009, 07:04
must... not... hit.. copy... ugh (kidding) thanks, i will take and use this to my advatage. thanks again

_________________
Oh that divide overflow. Just jumps out of the bushes every time to scare the day lights out of me.
Post 12 Jun 2009, 07:04
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.