## Keyboard shortcuts

Press `←` or `→` to navigate between chapters

Press `S` or `/` to search in the book

Press `?` to show this help

Press `Esc` to hide this help

# 80×86 Architecture: Windows OMF

Assembler code

    VIRDEF01:00000020 ; VIRDEF, segment _TEXT
    VIRDEF01:00000020 ; NOTE: VIRDEF records cannot be represented in assembly!
    VIRDEF01:00000020 ; ===========================================================================
    VIRDEF01:00000020
    VIRDEF01:00000020 ; Segment type: Pure code
    VIRDEF01:00000020 VIRDEF01        segment dword public 'CODE' use32
    VIRDEF01:00000020                 assume cs:VIRDEF01
    VIRDEF01:00000020                 ;org 20h
    VIRDEF01:00000020                 assume es:nothing, ss:nothing, ds:DGROUP, fs:nothing, gs:nothing
    VIRDEF01:00000020
    VIRDEF01:00000020 ; =============== S U B R O U T I N E =======================================
    VIRDEF01:00000020
    VIRDEF01:00000020 ; Attributes: bp-based frame
    VIRDEF01:00000020
    VIRDEF01:00000020                 public lread
    VIRDEF01:00000020 lread           proc near
    VIRDEF01:00000020
    VIRDEF01:00000020 arg_0           = dword ptr  8
    VIRDEF01:00000020 arg_4           = dword ptr  0Ch
    VIRDEF01:00000020 arg_8           = dword ptr  10h
    VIRDEF01:00000020
    VIRDEF01:00000020                 push    ebp
    VIRDEF01:00000021                 mov     ebp, esp
    VIRDEF01:00000023                 push    ebx
    VIRDEF01:00000024                 mov     ebx, [ebp+arg_8]
    VIRDEF01:00000027                 push    ebx
    VIRDEF01:00000028                 push    [ebp+arg_4]
    VIRDEF01:0000002B                 push    [ebp+arg_0]
    VIRDEF01:0000002E                 call    qlread
    VIRDEF01:00000033                 cmp     ebx, eax
    VIRDEF01:00000035                 jz      short loc_10072
    VIRDEF01:00000037                 push    offset aReadError ; "read error\n"
    VIRDEF01:0000003C                 call    @error$qpxce    ; error(char *,...)
    VIRDEF01:00000041                 pop     ecx
    VIRDEF01:00000042
    VIRDEF01:00000042 loc_10072:                              ; CODE XREF: lread+15↑j
    VIRDEF01:00000042                 pop     ebx