• Please review our updated Terms and Rules here

Search results

  1. pan069

    EGA PEL panning & scanlines

    For VGA you just need to wait for 2 hsyncs per iteration, i.e. EGA and VGA need their own loops. I'm using that technique for a copper bar effect in mode x0d somewhere, changing the background color every other 2 scanlines. I always thought that the offset register and PEL only took effect on...
  2. pan069

    LDebug — „debug de Luxe”!

    Sounds interesting. Is this it? https://pushbx.org/ecm/web/#projects-ldebug
  3. pan069

    Borland Turbo C BASM / x86 question

    I saw your question earlier in the week and because I don't have a straight and easy answer I didn't bother writing a reply. But... This question kept rolling around in my brain and even though I still don't have a straight and easy answer, I'll have a stab at writing some thoughts. Can it be...
  4. pan069

    Another BASM question if anyone knows it

    You can probably do something like this (of the top of my head): long myfunc( ... ) { long handle; ... asm mov [word ptr handle + 0], ax asm mov [word ptr handle + 2], dx ... return handle; }
  5. pan069

    is ZERO an invalid dos file handle?

    I don't think there is. If CARRY is ZERO then the range of handles would theoretically be from 0 to 65535.
  6. pan069

    is ZERO an invalid dos file handle?

    The CARRY flag is set when there was an error. So, when CARRY is set, AX is the error code. https://stanislavs.org/helppc/int_21-3d.html
  7. pan069

    Help needed with writing an AIL/32 driver: dummy driver works in ASM, but not in C

    It probably doesn't matter to finding an answer to your problem but I have never seen this appoach to packed structs in Watcom C before. The only method I have used is the #pragma directive: #pragma pack(push) #pragma pack(1) typedef struct { } FOO; #pragma pack(pop) The (push) and (pop)...
  8. pan069

    A driver model in C (16bit DOS)

    Valid points, but what I am after is far more simplistic. If I was doing anything more serious I would certainly look into the suggestions made here. The link with the CT-VOICE.DRV I posted earlier seems to have everything I need for my purpose, so I'll go with that. Thanks all.
  9. pan069

    A driver model in C (16bit DOS)

    Thanks guys. I think the word "driver" might have thrown some people off in what it is that I am trying to do. I basically just want to externalise some behaviour of my program, e.g. a sound driver. Where each driver (e.g. a .DRV file) implements the same interface but different behaviour...
  10. pan069

    A driver model in C (16bit DOS)

    No idea what PLI/80 overlay files are. More like video and sound drivers like in old Sierra games.
  11. pan069

    A driver model in C (16bit DOS)

    Hi all. I'm working on a little project for which I want to have a driver model. E.g. to have an external binary file (e.g. a .COM file) that can be loaded into memory and and then functions within the file to be executed. I was wondering if anyone has an example on how to do this? I'm using...
  12. pan069

    MASM struct and pointer syntax

    MASM doesn't run on Linux.
  13. pan069

    MASM struct and pointer syntax

    It seems that all the problems I have run into with WASM have been resolved by JWASM. No idea that it existed but switching to it has been a good move for me. https://wiki.osdev.org/JWASM https://www.japheth.de/JWasm.html
  14. pan069

    MASM struct and pointer syntax

    In MASM 5 you have to do it like this: STUDENT struct student_status db ? student_age db ? student_name 20 dup(?) STUDENT ends TEACHER struct teacher_status db ? teacher_name db 20 dup(?) TEACHER ends I.e. the attribute names within the strucuture must be globally unique (to the...
  15. pan069

    MASM struct and pointer syntax

    Found this interesting bit in a random MASM 6.1 document [1] from a google search (on page 96): So, I guess that clears that up. Not a bug but WASMs MASM support is probably MASM version 5 or something... [1] https://www.mikrocontroller.net/attachment/450367/MASM61PROGUIDE.pdf
  16. pan069

    MASM struct and pointer syntax

    I never really used WASM either but I am very famlier with the Watcom toolchain, its what I used to use back in the day for C programming. The OpenWatcom version is pretty good and since it run natively on Linux I can run a build with Make in a "normal" terminal (rather than the 80x40, no...
  17. pan069

    MASM struct and pointer syntax

    Its not 100% clear to me to what extend WASM is compatible with MASM, it has a -zqm=masm command line option but there is no indication of version and/or support. I assume its either an old version or not fully compatible. When I tested to verify if the same behaviour would occur with MASM I...
  18. pan069

    MASM struct and pointer syntax

    Thanks @daver2. What you're saying is true but the question/conversation is about "pointers to structures", see the answer by @carlos12 as it might clarify things. However, I found the problem to the nested issue. I am actually using OpenWatcom Assembler (WASM) which is MASM compatible, at...
  19. pan069

    MASM struct and pointer syntax

    Ran into another snag... Nested structs... 🤔 SCORE_CARD struct period dw ? score db ? SCORE_CARD ends STUDENT struct status db ? score_cards SCORE_CARD 10 dup(<>) age db ? name 20 dup(?) STUDENT ends If now trying to get the offset of "age" it returns what seems a "random" value...
  20. pan069

    MASM struct and pointer syntax

    Thanks @carlos12 much appreciated. I see, I did try something like that using the pointer (add si,student_ptr.name) assuming that the assembler would be smart enough the figure it out, but alas. But I see, I should be using the "struct definition itself" to obtain the offset of the attribute...
Back
Top