Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TASM 2.x / MASM 6.x Assembly Language - <b>@cpu return cpu information predefined equ</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
@CPU             Return CPU Information                      Predefined EQU

  @CPU

     This predefined equate returns CPU information. It evaluates to a number
     with the following bits set:

                    Bit Number          Means
                    ----------          -----
                        0               8086 instructions supported
                        1               80186 instructions supported
                        2               80286 instructions supported
                        3               80386 instructions supported
                        7               Privileged instructions
                                                (. 80286) supported
                        8               8087 instructions supported
                        10              80287 instructions supported
                        11              80387 instructions supported

     Several of the above bits may be set. For example, a processor like the
     80286 supports 8086 instructions as well as 80186 instructions, so bits
     0, 1 and 2 would be set if the CPU is an 80286. Similarly, if an 80387
     was present, bits 8, 10, and 11 would be set.

     You can check the value of @CPU with an IF statement, and conditionally
     assemble CPU-specific instructions that way.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson