home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / progmisc / acksrc.zip / ACKASM.240 < prev    next >
Text File  |  1993-06-19  |  16KB  |  618 lines

  1. PAGE 80,132
  2. TITLE - XTASM.ASM - Assembly routines for 3D engine
  3. ;;;.286P
  4. ;==============================================================================
  5. ; COMMAND LINE ASSEMBLY
  6. ;    MASM /B63 /Z /D_Mx FILENAME;
  7. ;
  8. ;  WHERE Mx SPECIFIES MODEL (l OR c) FOR LARGE OR COMPACT MODELS
  9. ;==============================================================================
  10.     INCLUDE        ET.EQU
  11.     INCLUDE        ET.MAC
  12.  
  13.     ANGLE_30    equ        160
  14.     ANGLE_360   equ        1920
  15.  
  16.     extrn    _bMaps:DWORD
  17.     extrn    _oMaps:DWORD
  18.     extrn    _bdfp:DWORD
  19.     extrn    _PageBegin:WORD
  20.     extrn    _InvCosTable:DWORD
  21.     extrn    _InvSinTable:DWORD
  22.     extrn    _LongCosTable:DWORD
  23.     extrn    _DistanceTable:WORD
  24.     extrn    _AdjustTable:DWORD
  25.     extrn    _CenterRow:WORD
  26.     extrn    _MaxDistance:WORD
  27.     extrn    _TopColor:WORD
  28.     extrn    _BottomColor:WORD
  29.  
  30.     extrn    _lowmask:BYTE
  31.     extrn    _Walls:WORD
  32.  
  33.  
  34.     extrn    _xRay:NEAR
  35.     extrn    _yRay:NEAR
  36.     extrn    N_LDIV@:FAR
  37.  
  38.  
  39.     PUBLIC        _graphinit
  40.     PUBLIC        _usepage
  41.     PUBLIC        _flippage
  42.     PUBLIC        _SetPalette
  43.     PUBLIC        _DrawWalls
  44.     PUBLIC        _DrawOneObject
  45.  
  46. SC_INDEX equ    03c4h    ;Sequence Controller Index
  47. CRTC_INDEX equ    03d4h    ;CRT Controller Index
  48. MISC_OUTPUT equ 03c2h    ;Miscellaneous Output register
  49. SCREEN_SEG equ    0a000h    ;segment of display memory in mode X
  50.  
  51.  
  52. _TEXT    segment byte public 'CODE'
  53. DGROUP    group    _DATA,_BSS
  54.     assume    cs:_TEXT,ds:DGROUP
  55. _ViewPage  dw 0 ; The address of the current view page
  56. _WritePage dw 0 ; The address of the current write page
  57. PageTable dw 4 dup (0)     ; Address of 4 pages
  58. ScreenWidth dw 320/4     ; The width of the screen
  59. PageSize    dw 320/4*240 ; The size of each page
  60. CRTParms label    word
  61.           dw      00d06h  ;vertical total
  62.           dw      03e07h  ;overflow (bit 8 of vertical counts)
  63.           dw      04109h  ;cell height (2 to double-scan)
  64.           dw      0ea10h  ;v sync start
  65.           dw      0ac11h  ;v sync end and protect cr0-cr7
  66.           dw      0df12h  ;vertical displayed
  67.           dw      00014h  ;turn off dword mode
  68.           dw      0e715h  ;v blank start
  69.           dw      00616h  ;v blank end
  70.           dw      0e317h  ;turn on byte mode
  71. CRT_PARM_LENGTH equ    (($-CRTParms)/2)
  72.  
  73. _TEXT    ends
  74. _DATA    segment word public 'DATA'
  75. ; Index/data pairs for CRT Controller registers that differ between
  76. ; mode 13h and mode X.
  77. _d@    label    byte
  78. _DATA    ends
  79. _BSS    segment word public 'BSS'
  80. _b@    label    byte
  81. _BSS    ends
  82.  
  83.  
  84. public _graphinit
  85. public _ViewPage,_WritePage
  86. public ScreenWidth,PageSize,PageTable
  87.  
  88.  
  89. _TEXT    SEGMENT byte public 'CODE'
  90.     ASSUME cs:_TEXT
  91.  
  92. ;==============================================================================
  93. ; void graphinit(int width,int psize,int mask)
  94. ;   width - width of the screen in bytes/plane (defaults to 320/4 if 0)
  95. ;   psize - size of each page in bytes/plane (defaults to 320*200/4 if 0)
  96. ;==============================================================================
  97. PBEGIN     _graphinit
  98.      push bp
  99.      mov bp,sp
  100.      push si
  101.      push di
  102.      push ds
  103.  
  104.      mov ax,cs
  105.      mov ds,ax
  106.      mov es,ax
  107.  
  108.      mov bx,320/4
  109.      mov cs:[ScreenWidth],bx
  110.      mov bx,320/4*240
  111.     mov cs:[PageSize],bx
  112.  
  113.     ; Set up the page table
  114.  
  115.     xor ax,ax
  116.     mov bx,cs:[PageSize]
  117.     lea di,cs:[PageTable]
  118.     mov cx,4
  119. init4:
  120.     stosw
  121.     add ax,bx
  122.     loop init4
  123.  
  124. ;;;;;    mov    word ptr cs:[PageTable+2],8000H
  125.  
  126. ; Now set up the graphics mode
  127.  
  128.     mov ax,13h
  129.     int 10h ; Set 320x200x256
  130.  
  131.     mov dx,SC_INDEX
  132.     mov ax,0604h
  133.     out dx,ax    ;disable chain4 mode
  134.     mov ax,0100h
  135.     out dx,ax    ;synchronous reset while switching clocks
  136.  
  137.     mov dx,MISC_OUTPUT
  138.     mov al,0e3h
  139.     out dx,al    ;select 28 MHz dot clock & 60 Hz scanning rate
  140.  
  141.     mov dx,SC_INDEX
  142.     mov ax,0300h
  143.     out dx,ax    ;undo reset (restart sequencer)
  144.  
  145.     mov dx,CRTC_INDEX ;reprogram the CRT Controller
  146.     mov al,11h    ;VSync End reg contains register write
  147.     out dx,al    ; protect bit
  148.     inc dx    ;CRT Controller Data register
  149.     in al,dx   ;get current VSync End register setting
  150.     and al,7fh    ;remove write protect on various
  151.     out dx,al    ; CRTC registers
  152.     dec dx    ;CRT Controller Index
  153.     cld
  154.     mov si,offset CRTParms ;point to CRT parameter table
  155.     mov cx,CRT_PARM_LENGTH ;# of table entries
  156. SetCRTParmsLoop:
  157.     lodsw        ;get the next CRT Index/Data pair
  158.     out dx,ax    ;set the next CRT Index/Data pair
  159.     loop SetCRTParmsLoop
  160.  
  161.     mov dx,SC_INDEX
  162.     mov ax,0f02h
  163.     out dx,ax    ;enable writes to all four planes
  164.     mov ax,SCREEN_SEG ;now clear all display memory, 8 pixels
  165.     mov es,ax          ; at a time
  166.     sub di,di    ;point ES:DI to display memory
  167.     sub ax,ax    ;clear to zero-value pixels
  168.     mov cx,8000h ;# of words in display memory
  169.     rep stosw    ;clear all of display memory
  170.  
  171.     pop ds
  172.     pop di    ;restore C register vars
  173.     pop si
  174.     pop bp    ;restore caller's stack frame
  175.     ret
  176. _graphinit endp
  177.  
  178. ;==============================================================================
  179. ; void SetVGAmode(void);
  180. ;==============================================================================
  181. PBEGIN    _SetVGAmode
  182.     push    bp
  183.     mov    ax,13h
  184.     int    10h        ; Set 320x200x256
  185.     pop    bp
  186.     ret
  187. _SetVGAmode endp
  188.  
  189. ;==============================================================================
  190. ; void usepage(int page)
  191. ;==============================================================================
  192. UPnum    equ    [bp+ABASE]
  193.  
  194. PBEGIN    _usepage
  195.     push bp
  196.     mov bp,sp
  197.     mov bx,UPnum
  198.     and bx,3
  199.     shl bx,1
  200.     mov ax,cs:PageTable[bx]
  201.     mov cs:[_WritePage],ax
  202.     pop bp
  203.     ret
  204. _usepage endp
  205.  
  206. ;==============================================================================
  207. ; void flippage()
  208. ;
  209. ; NOTE: Some lines have been commented out for test purposes. If you experience
  210. ;    flicker when the page flips, un-comment the lines waiting for vertical
  211. ;    retrace.
  212. ;==============================================================================
  213. PBEGIN    _flippage
  214.     mov cx,cs:[_ViewPage]
  215.     xchg cx,cs:[_WritePage]
  216.     mov cs:[_ViewPage],cx ; An ISR will set the VGA at the next retrace
  217.  
  218.     mov  bh,0dH
  219.     mov  bl,cl
  220.     mov dx,3dah
  221.  
  222. Ret1:
  223. ;;;;    in al,dx
  224. ;;;;    test al,1
  225. ;;;;    jnz Ret1 ; Wait for display enable
  226.  
  227.  
  228.  
  229. ;    cli
  230.     mov al,0ch
  231.     mov ah,ch
  232.     mov dx,3d4h
  233.     out dx,ax    ; set the displayed offset (high)
  234. ;    inc al
  235. ;    mov ah,cl
  236. ;;;    mov ax,bx
  237. ;;;    out dx,ax    ; set the displayed offset (low)
  238. ;    sti
  239.  
  240. ;;    mov dx,3dah
  241. Ret2:
  242. ;;    in al,dx
  243. ;;    test al,8
  244. ;;    jz Ret2 ; Wait for the video card to use the address just set
  245.  
  246.     ret
  247. _flippage endp
  248.  
  249.  
  250. ;==============================================================================
  251. ; void SetPalette(unsigned char far *PalBuf);
  252. ;==============================================================================
  253. SPbuf    equ    [bp+ABASE]
  254.  
  255. PBEGIN    _SetPalette
  256.     push    bp
  257.     mov    bp,sp
  258.     push    ds
  259.     push    si
  260.  
  261.     lds    si,dword ptr SPbuf
  262.     mov    cx,256
  263.     xor    bx,bx
  264.     cld
  265.     mov    dx,3C8H
  266. sp010:
  267.     mov    al,bl
  268.     out    dx,al
  269.     inc    dx
  270.     lodsb
  271.     out    dx,al
  272.     lodsb
  273.     out    dx,al
  274.     lodsb
  275.     out    dx,al
  276.     dec    dx
  277.     inc    bx
  278.     loop    sp010
  279.  
  280.     pop    si
  281.     pop    ds
  282.     pop    bp
  283.     ret
  284. _SetPalette endp
  285.  
  286. ;==============================================================================
  287. ; void DrawWalls(void);
  288. ;==============================================================================
  289. Y2    equ    [bp-2]
  290. AVLOW    equ    [bp-4]
  291. AVHI    equ    [bp-6]
  292. VCOL    equ    [bp-8]
  293. BOFFLOW equ    [bp-10]
  294. BOFFHI    equ    [bp-12]
  295. sColor    equ    [bp-14]
  296. fColor    equ    [bp-16]
  297.  
  298. PBEGIN    _DrawWalls
  299.     push    bp
  300.     mov    bp,sp
  301.     sub    sp,18
  302.     push    ds
  303.     push    si
  304.     push    di
  305.  
  306.     mov    dx,3c4H
  307.     mov    ax,0F02H
  308.     out    dx,ax            ;Select map mask and all planes
  309.  
  310.     mov    bx,word ptr DGROUP:_MaxDistance ; Get max distance to wall
  311.     shl    bx,1            ; Make a word index
  312.     mov    ax,word ptr DGROUP:_DistanceTable[bx] ;Look up actual height
  313.     cmp    ax,240            ; Full screen height?
  314.     jae    drw000            ; Yes, nothing to fill in
  315.  
  316.     and    ax,0FFFEH        ; Strip any odd values
  317.     mov    bx,ax            ; Save height
  318.     mov    si,ax            ; Again save height
  319.     shr    bx,1            ; Get Height / 2                                                                                                                                     
  320.     mov    dx,120            ; Pick up our center row
  321.     sub    dx,bx            ; and sub ht/2
  322.     mov    bx,dx            ; Save new value
  323.     mov    cl,6            ; Get ready to mult by 80
  324.     shl    bx,cl            ; first mult by 64
  325.     shl    si,cl            ; also mult the original ht
  326.     mov    cl,4            ; No do a mult by 16
  327.     shl    dx,cl            ; to top layer
  328.     shl    ax,cl            ; and initial height
  329.     add    bx,dx            ; Add x64 and x16 for x80
  330.     add    si,ax            ; do same with height
  331.  
  332.     mov    ax,0A000H
  333.     mov    es,ax
  334.     mov    di,cs:_WritePage    ;get start of buffer
  335.  
  336.     mov    ax,ds:_TopColor
  337.     mov    ah,al
  338.     shr    bx,1            ;only fill words
  339.     mov    cx,bx            ;get amount to fill in
  340.   rep    stosw
  341.     add    di,si            ;then skip amount of wall
  342.     mov    ax,ds:_BottomColor
  343.     mov    ah,al
  344.     mov    cx,bx
  345.   rep    stosw
  346.  
  347.  
  348. drw000:
  349.     xor    bx,bx            ;Initial loop/plane counter
  350.  
  351. drw010:
  352.     push    bx            ;save loop/plane counter
  353.     mov    VCOL,bx            ;Set beginning video column
  354.     mov    dx,3c5H
  355.     mov    al,byte ptr DGROUP:_lowmask[bx]
  356.     out    dx,al            ;select mask to write to
  357.     mov    si,offset _Walls    ; Point to wall array
  358.     shl    bx,1
  359.     shl    bx,1
  360.     shl    bx,1            ;x 8 for correct wall structure
  361.     add    si,bx
  362.  
  363.     mov    cx,80            ;Number of walls to display
  364. drw020:
  365.     push    ds            ;save data segment
  366.     push    si            ;save wall pointer
  367.     push    cx            ;save wall count
  368.     lodsw                ;Get bitmap number
  369.     xchg    ax,bx            ;use bx as the index
  370.     shl    bx,1
  371.     shl    bx,1            ;dword index into bitmap table
  372.     mov    di,word ptr DGROUP:_bMaps[bx]        ;offset to bitmap
  373.     mov    es,word ptr DGROUP:_bMaps[bx+2]        ;segment of bitmap
  374.     lodsw                ;get bitmap column to display
  375.     mov    cl,6
  376.     shl    ax,cl            ;x64 to get correct row
  377.     add    di,ax            ;and add to bitmap offset
  378.     lodsw                ;get bitmap distance
  379.     shl    ax,1            ; Make word index for table lookup
  380.     mov    si,ax            ;save distance
  381.     mov    bx,word ptr DGROUP:_DistanceTable[si]  ;get height of bitmap
  382.  
  383.     mov    cx,word ptr DGROUP:_CenterRow
  384.     mov    ax,bx            ; Pick up the height
  385.     shr    ax,1            ; Divide by two
  386.     sub    cx,ax            ; And subtract from center for Y1
  387.  
  388.     mov    ax,cx            ; Start with Y1
  389.     add    ax,bx            ; and add height to it for Y2
  390.  
  391.     cmp    ax,239            ; Don't let Y2 go beyond screen height
  392.     jle    short drw030
  393.     mov    ax,239            ; Else force it to screen height
  394. drw030:
  395.     mov    Y2,ax            ;save y2
  396.     shl    si,1            ; Turn object distance into dword index
  397.  
  398.     mov    ax,word ptr DGROUP:_AdjustTable[si+2]
  399.     mov    dx,word ptr DGROUP:_AdjustTable[si]
  400.  
  401.     mov    AVHI,ax            ; Get (64 * 65536) / height
  402.     mov    AVLOW,dx
  403.     xchg    si,di            ;si now points to bitmap
  404.     mov    di,VCOL            ; Video column to display at
  405.     sar    di,1            ; Divide by 4 to get correct planar col
  406.     sar    di,1            ; Divide by 4 to get correct planar col
  407.     add    di,word ptr cs:_WritePage ; Add in page offset
  408.     mov    ax,es            ; Pick up segment to bitmap
  409.     mov    ds,ax            ; now ds:si points to bitmap
  410.     mov    ax,0A000H        ; Video segment
  411.     mov    es,ax            ; now es:di points to screen
  412.     mov    word ptr BOFFLOW,0    ; Initialize the current bitmap offset
  413.     mov    word ptr BOFFHI,0
  414.  
  415.     cmp    cx,word ptr Y2        ; is Y1 > Y2?
  416.     jge    short drw090        ; Yes, get on out
  417.     or    cx,cx            ; Y1 <= 0?
  418.     jle    drw050            ; Yes, no sky color needed
  419.  
  420.     mov    ax,cx            ; Get copy of Y1
  421.     mov    bx,cx            ; and another copy
  422.     mov    cl,6
  423.     shl    ax,cl            ; do a mult 64
  424.     add    di,ax            ; and add to video offset
  425.     mov    cl,4
  426.     mov    ax,bx            ; get original Y1
  427.     shl    ax,cl            ; do a mult 16
  428.     add    di,ax            ; and add to video for a mult 80
  429.     xchg    cx,bx            ; restore original Y1
  430.  
  431. drw050:
  432.     mov    bx,79            ; Offset to next video row
  433.     mov    dx,AVLOW        ; Hold onto lsb of adjustment
  434.     mov    ax,AVHI            ; Pick up msb of bitmap adjustment
  435.  
  436. ;------------------------------------------------------------------------------
  437. ; Here is where the actual bitmap is transferred to the screen. Better
  438. ; optimization could be done by precalculating the adjustment factor instead
  439. ; of looping until Y1 >= 0. This has not been tried so I don't know if the
  440. ; speed would make it worth it....
  441. ;------------------------------------------------------------------------------
  442. drw060:
  443.     or    cx,cx            ; Is Y1 still < 0 ?
  444.     jl    short drw070        ; Yes, don't start drawing yet
  445.  
  446.     movsb                ;Move bitmap to video
  447.     dec    si
  448.     add    di,bx            ;next row of video
  449.  
  450. drw070:
  451.     add    word ptr BOFFLOW,dx    ; Add lsb to current offset
  452.     adc    si,ax            ; Use msb to get next bitmap location
  453.     inc    cx            ; Next y1
  454.     cmp    cx,word ptr Y2        ; Beyond Y2 yet?
  455.     jl    short drw060        ; Nope, keep looping
  456.  
  457. drw090:
  458.     pop    cx            ;get wall count
  459.     pop    si            ;recover structure pointer
  460.     pop    ds
  461.     add    si,32            ;Wall structure size * 4
  462.     add    word ptr VCOL,4        ;next video column to display at
  463.     dec    cx
  464.     jz    drw100
  465.     jmp    drw020            ;next wall to display
  466.  
  467. drw100:
  468.     pop    bx            ;recover loop/plane counter
  469.     inc    bx
  470.     cmp    bx,4            ;all 4 planes?
  471.     je    drwDone
  472.     jmp    drw010
  473.  
  474. drwDone:
  475.     mov    dx,3c5H
  476.     mov    al,0FFH            ;Enable all planes again
  477.     out    dx,al
  478.     pop    di
  479.     pop    si
  480.     pop    ds
  481.     mov    sp,bp
  482.     pop    bp
  483.     ret
  484. _DrawWalls endp
  485.  
  486. ;==============================================================================
  487. ;              +4         +6        +8        +10           +12
  488. ;  void DrawOneObject(int ObjNum,int ObjCol,int ObjDist,int VidCol,int PageNum);
  489. ;==============================================================================
  490. PBEGIN    _DrawOneObject
  491.     push    bp
  492.     mov    bp,sp
  493.     sub    sp,20
  494.     push    si
  495.     push    di
  496.     push    ds
  497.  
  498.     mov    cx,word ptr [bp+10]    ; Video column
  499.     and    cx,3            ; Only need lower three bits
  500.     mov    ah,11h
  501.     rol    ah,cl
  502.     mov    al,2
  503.     mov    dx,3c4h
  504.     out    dx,ax
  505.  
  506.     mov    bx,word ptr [bp+8]    ; Get the distance to the bitmap
  507.     shl    bx,1            ; Make word index for table lookup
  508.     mov    si,bx            ; Save index for now
  509.     mov    bx,word ptr DGROUP:_DistanceTable[bx]
  510.  
  511. dob010:
  512.     mov    cx,word ptr DGROUP:_CenterRow
  513.     mov    ax,bx            ; Pick up the height
  514.     shr    ax,1            ; Divide by two
  515.     sub    cx,ax            ; And subtract from center for Y1
  516.  
  517.     mov    di,cx            ; Start with Y1
  518.     add    di,bx            ; and add height to it for Y2
  519.  
  520.     cmp    di,239            ; Don't let Y2 go beyond screen height
  521.     jle    short dob020
  522.     mov    di,239            ; Else force it to screen height
  523.  
  524. dob020:
  525.     mov    word ptr [bp-2],di  ;save y2
  526.     shl    si,1            ; Turn object distance into dword index
  527.  
  528.     mov    ax,word ptr DGROUP:_AdjustTable[si+2]
  529.     mov    dx,word ptr DGROUP:_AdjustTable[si]
  530.  
  531.     mov    word ptr [bp-14],ax    ; Get (64 * 65536) / height
  532.     mov    word ptr [bp-16],dx
  533.  
  534.     mov    bx,word ptr [bp+4]    ; Bitmap number to display
  535.     shl    bx,1            ; dword index
  536.     shl    bx,1            ; dword index
  537.     mov    ax,word ptr DGROUP:_oMaps[bx+2]
  538.     mov    dx,word ptr DGROUP:_oMaps[bx]
  539.  
  540.     mov    bx,word ptr [bp+6]    ; Bitmap column to display
  541.     shl    bx,1
  542.     shl    bx,1
  543.     shl    bx,1
  544.     shl    bx,1
  545.     shl    bx,1
  546.     shl    bx,1            ; x 64 to get correct bitmap row
  547.     add    dx,bx            ; then add to start of bitmap
  548.     mov    word ptr [bp-6],ax
  549.     mov    word ptr [bp-8],dx
  550.  
  551.     mov    di,word ptr [bp+10]    ; Video column to display at
  552.     sar    di,1            ; Divide by 4 to get correct planar col
  553.     sar    di,1            ; Divide by 4 to get correct planar col
  554.     mov    bx,word ptr [bp+12]    ; Page number to display at
  555.     shl    bx,1            ; Make a word index
  556.     add    di,word ptr DGROUP:_PageBegin[bx]   ;Pick up actual offset
  557.     mov    ax,0A000H        ; Video segment
  558.     mov    es,ax
  559.     mov    word ptr [bp-18],0    ; Initialize the current bitmap offset
  560.     mov    word ptr [bp-20],0
  561.  
  562.     or    cx,cx            ; Is Y1 > 0 ?
  563.     jle    short dob030        ; Nope, start above video
  564.  
  565.     xchg    si,cx            ; hold onto original value
  566.     mov    ax,si            ; get Y1 coordinate
  567.     mov    cl,6            ; mult by 64
  568.     shl    ax,cl
  569.     mov    dx,si            ; get back Y1
  570.     mov    cl,4
  571.     shl    dx,cl            ; mult by 16
  572.     add    ax,dx            ; now add to Y1 * 64 to get Y1 * 80
  573.     add    di,ax            ; and add to start of video
  574.     xchg    cx,si            ; get back original Y1
  575.  
  576. dob030:
  577.     cmp    cx,word ptr [bp-2]    ; is Y1 > Y2?
  578.     jge    short dob090        ; Yes, get on out
  579.  
  580.     mov    bx,80            ;Amount to next row of video
  581.     lds    si,dword ptr [bp-8]    ;Get image buffer
  582.     mov    dx,word ptr [bp-16]    ; Hold onto lsb of adjustment
  583.  
  584. dob040:
  585.     or    cx,cx            ; Is Y1 still < 0 ?
  586.     jl    short dob080        ; Yes, don't start drawing yet
  587.  
  588.     lodsb
  589.     dec    si
  590.     or    al,al            ;Transparent color?
  591.     jz    dob050            ;Yes, don't write it to video
  592.     mov    byte ptr es:[di],al    ;place character in video
  593.  
  594. dob050:
  595.     add    di,bx            ;next row of video
  596.  
  597. dob080:
  598.     mov    ax,word ptr [bp-14]    ; Pick up msb of bitmap adjustment
  599.     add    word ptr [bp-20],dx    ;   and add to current offset
  600.     adc    si,ax            ; Keep the msb correct
  601.     inc    cx            ; Next y1
  602.     cmp    cx,word ptr [bp-2]    ; Beyond Y2 yet?
  603.     jl    short dob040        ; Nope, keep looping
  604.  
  605. dob090:
  606.     pop    ds
  607.     pop    di
  608.     pop    si
  609.     mov    sp,bp
  610.     pop    bp
  611.     ret
  612. _DrawOneObject      endp
  613.  
  614.  
  615. _TEXT    ENDS
  616.     END
  617.  
  618.