Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

indirect far jmp - calling old INT problem (Developers)

posted by ecm Homepage E-mail, Düsseldorf, Germany, 13.05.2012, 23:49

>   PUSH    BP              ;store BP (2B), SP=x-8
>   MOV     BP,SP           ;set BP to current SP, BP=SP=x-8
>
>
> Reminds me of "ENTER ..,.." instruction (186+).

As RayeR noted, enter takes 4 bytes. It only saves any space if you additionally need to subtract a constant from sp, in which case the manual code will usually take 6 bytes (instead of only 3 bytes like the above.)

> Make sure this isn't generating that
> extra byte you don't want as you probably don't need to say it explicitly.

Generating an unnecessary extra byte in this case is one of NASM's "features" ;) Actually, it just simplifies the assembler implementation a lot, so, well, you'd better know what you're doing.

---
l

 

Complete thread:

Back to the forum
Board view  Mix view
22762 Postings in 2122 Threads, 402 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum