Re: asm grep




"Frank Kotler" <fbkotler@xxxxxxxxxxx> wrote in message
news:d54ej.1846$Xe5.1527@xxxxxxxxxxx
I think I can make it smaller and faster, with the same feature-set.
Okay, but *I* kinda like the "i" switch. You mentioned "-B 2"... okay,
some "context" would be cool... I was hoping to limit it to
single-letter options, "-B 2" is a little harder to parse...


Occasionally nice, but not needed, just an example... When I need it, I
rarely need more than -B 2 -A 2. Maybe an arg like -C or -4 or -5 to give
four/five lines of context, otherwise default to one line.

Hmm, most interesting thing in this thread so far... Can an assembly
grep
be small, fast, full featured, and compilable for both DOS and Linux?
Someone would probably have to do an in depth comparison of DOS api and
Linux int 0x80 syscalls... (I've been meaning too, haven't done so...)

What's the dos interrupt for "mmap"?


This probably isn't the direction you want to go... Mostly theoretical
thought (para below if interested). :-) Dealing with multiple OSes will
probably lead one astray.

DOS is 16-bit and everything below 1Mb is memory mapped... DOS won't work
above 1Mb. To execute 32-bit code or access memory above 1Mb would require
code to do RM to PM and PM to RM transitions and a memory manager for above
1Mb. DPMI is one solution. Some DPMI hosts are non-paging and have all
memory physically mapped, but since some hosts page, the DPMI API has int
0x33, AX=800h, which maps memory physically. The intended purpose of this
call isn't to map memory, but to provide access to memory mapped devices
above 1Mb, but it works for memory too. Anyway, going this route is
problematic. I was thinking more along the lines of an PM int 0x80 syscall
interface for DOS DPMI. It would call PM DPMI functions and RM DOS
functions - the later switched to by the DPMI host. That's still much,
much, work... But, the idea of running native Linux app's on DOS has
intrigued me for a while. It might be easier to write PM int 0x80 syscall
interface now that Mike Gonta wrote aeBIOS, but aeBIOS doesn't run under
DOS... But, after it's been written, it could be reworked for DOS and
DPMI... Anyway, the fewer int 0x80 calls used, the easier it would be to
port to DOS. If there are no int 0x80 calls, then DPMI startup code could
be slapped on the beginning.


Rod Pemberton

.



Relevant Pages

  • Re: Port Application to 32 bit
    ... 640Kbytes memory barrier is causing a problem. ... I have not worked with DOS before so I am having difficulty get a ... DJGPP produces 32-bit PM code and uses DPMI. ...
    (comp.os.msdos.programmer)
  • Re: Locked memory
    ... > got to access big memory and start working in 32-bits. ... DOS extender. ... > I've seen the services in DPMI that I will use. ... First you should allocate extended memory then set up your descriptor ...
    (alt.lang.asm)
  • Re: Locked memory
    ... > DOS extender. ... One thing I'm lost on, and I can't find anything in the DPMI specs, is how ... to load in a file into big memory from disk. ... > First you should allocate extended memory then set up your descriptor ...
    (alt.lang.asm)
  • Re: List of lists code example
    ... Most of the examples I've found using int 21h, ... each respective author obtained from Andrew Schulman's "Undocumented DOS" ... I haven't seen any which obtain memory ... LoL (List of Lists) ...
    (comp.os.msdos.programmer)
  • Re: Resident code?
    ... sets up a new INT13h handler ... Now where (in what memory address) can I install the INT13h so it survives the loading of other boot components such as IO.SYS and MSDOS.SYS? ... INT 22, INT 23, and INT 24 are restored from the PSP does not close any open files the minimum number of bytes which will remain resident is 110h for ... Description: UDMA driver for DOS: up to 4 unlimited size hard drives ...
    (comp.lang.asm.x86)