home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / graphics / acksrc.zip / ACKASM.ASM < prev    next >
Assembly Source File  |  1993-06-20  |  16KB  |  639 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      04209h  ;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.  
  125. ; Now set up the graphics mode
  126.  
  127.     mov ax,13h
  128.     int 10h ; Set 320x200x256
  129.  
  130.     mov    dx,3d4h
  131.     mov    al,13h
  132.     out    dx,al
  133.     inc    dx
  134.     mov    al,2dh        ;Set bytes per line at 90
  135.     out    dx,al
  136.  
  137.     mov    dx,3c4h
  138.     mov    al,4
  139.     out    dx,al
  140.     inc    dx
  141.     in    al,dx
  142.     and    al,0f7h        ;Turn off chain4 mode
  143.     out    dx,al
  144.  
  145.     mov    dx,3d4h
  146.     mov    al,17h
  147.     out    dx,al
  148.     inc    dx
  149.     in    al,dx
  150.     or    al,40h        ;Turn on byte mode
  151.     out    dx,al
  152.  
  153.     mov    dx,3d4h
  154.     mov    al,14h
  155.     out    dx,al
  156.     inc    dx
  157.     in    al,dx
  158.     and    al,0bfh        ;Turn off double-word mode
  159.     out    dx,al
  160.  
  161.     mov    dx,3dah
  162.     in    al,dx
  163.     mov    dx,3c0h
  164.     mov    al,30h        ;Select Attribute index 10h
  165.     out    dx,al
  166.     mov    al,71h        ;Turn on PCS, PPC and G/A
  167.     out    dx,al
  168.  
  169.     mov ax,SCREEN_SEG ;now clear all display memory, 8 pixels
  170.     mov es,ax          ; at a time
  171.     sub di,di    ;point ES:DI to display memory
  172.     sub ax,ax    ;clear to zero-value pixels
  173.     mov cx,8000h ;# of words in display memory
  174.     rep stosw    ;clear all of display memory
  175.  
  176.     pop ds
  177.     pop di    ;restore C register vars
  178.     pop si
  179.     pop bp    ;restore caller's stack frame
  180.     ret
  181. _graphinit endp
  182.  
  183. ;==============================================================================
  184. ; void SetVGAmode(void);
  185. ;==============================================================================
  186. PBEGIN    _SetVGAmode
  187.     push    bp
  188.     mov    ax,13h
  189.     int    10h        ; Set 320x200x256
  190.     pop    bp
  191.     ret
  192. _SetVGAmode endp
  193.  
  194. ;==============================================================================
  195. ; void usepage(int page)
  196. ;==============================================================================
  197. UPnum    equ    [bp+ABASE]
  198.  
  199. PBEGIN    _usepage
  200.     push bp
  201.     mov bp,sp
  202.     mov bx,UPnum
  203.     and bx,3
  204.     shl bx,1
  205.     mov ax,cs:PageTable[bx]
  206.     mov cs:[_WritePage],ax
  207.     pop bp
  208.     ret
  209. _usepage endp
  210.  
  211. ;==============================================================================
  212. ; void flippage()
  213. ;
  214. ; NOTE: Some lines have been commented out for test purposes. If you experience
  215. ;    flicker when the page flips, un-comment the lines waiting for vertical
  216. ;    retrace.
  217. ;==============================================================================
  218. PBEGIN    _flippage
  219.     mov cx,cs:[_ViewPage]
  220.     xchg cx,cs:[_WritePage]
  221.     mov cs:[_ViewPage],cx ; An ISR will set the VGA at the next retrace
  222.  
  223.     mov  bh,0dH
  224.     mov  bl,cl
  225.     mov dx,3dah
  226.  
  227. Ret1:
  228. ;;;;    in al,dx
  229. ;;;;    test al,1
  230. ;;;;    jnz Ret1 ; Wait for display enable
  231.  
  232.  
  233.  
  234. ;    cli
  235.     mov al,0ch
  236.     mov ah,ch
  237.     mov dx,3d4h
  238.     out dx,ax    ; set the displayed offset (high)
  239. ;    inc al
  240. ;    mov ah,cl
  241. ;;;    mov ax,bx
  242. ;;;    out dx,ax    ; set the displayed offset (low)
  243. ;    sti
  244.  
  245. ;;    mov dx,3dah
  246. Ret2:
  247. ;;    in al,dx
  248. ;;    test al,8
  249. ;;    jz Ret2 ; Wait for the video card to use the address just set
  250.  
  251.     ret
  252. _flippage endp
  253.  
  254.  
  255. ;==============================================================================
  256. ; void SetPalette(unsigned char far *PalBuf);
  257. ;==============================================================================
  258. SPbuf    equ    [bp+ABASE]
  259.  
  260. PBEGIN    _SetPalette
  261.     push    bp
  262.     mov    bp,sp
  263.     push    ds
  264.     push    si
  265.  
  266.     lds    si,dword ptr SPbuf
  267.     mov    cx,256
  268.     xor    bx,bx
  269.     cld
  270.     mov    dx,3C8H
  271. sp010:
  272.     mov    al,bl
  273.     out    dx,al
  274.     inc    dx
  275.     lodsb
  276.     out    dx,al
  277.     lodsb
  278.     out    dx,al
  279.     lodsb
  280.     out    dx,al
  281.     dec    dx
  282.     inc    bx
  283.     loop    sp010
  284.  
  285.     pop    si
  286.     pop    ds
  287.     pop    bp
  288.     ret
  289. _SetPalette endp
  290.  
  291. ;==============================================================================
  292. ; void DrawWalls(void);
  293. ;==============================================================================
  294. Y2    equ    [bp-2]
  295. AVLOW    equ    [bp-4]
  296. AVHI    equ    [bp-6]
  297. VCOL    equ    [bp-8]
  298. BOFFLOW equ    [bp-10]
  299. BOFFHI    equ    [bp-12]
  300. sColor    equ    [bp-14]
  301. fColor    equ    [bp-16]
  302.  
  303. PBEGIN    _DrawWalls
  304.     push    bp
  305.     mov    bp,sp
  306.     sub    sp,18
  307.     push    ds
  308.     push    si
  309.     push    di
  310.  
  311.     mov    dx,3c4H
  312.     mov    ax,0F02H
  313.     out    dx,ax            ;Select map mask and all planes
  314.  
  315.     mov    bx,word ptr DGROUP:_MaxDistance ; Get max distance to wall
  316.     shl    bx,1            ; Make a word index
  317.     mov    ax,word ptr DGROUP:_DistanceTable[bx] ;Look up actual height
  318.     cmp    ax,200            ; Full screen height?
  319.     jae    drw000            ; Yes, nothing to fill in
  320.  
  321.     and    ax,0FFFEH        ; Strip any odd values
  322.     mov    bx,ax            ; Save height
  323.     mov    si,ax            ; Again save height
  324.     shr    bx,1            ; Get Height / 2
  325.     mov    dx,100            ; Pick up our center row
  326.     sub    dx,bx            ; and sub ht/2
  327.     mov    bx,dx            ; Save new value
  328.  
  329.     mov    ax,90
  330.     imul    dx
  331.     mov    bx,ax
  332.     mov    ax,90
  333.     imul    si
  334.     mov    si,ax
  335.  
  336. ;    mov    cl,6            ; Get ready to mult by 80
  337. ;    shl    bx,cl            ; first mult by 64
  338. ;    shl    si,cl            ; also mult the original ht
  339. ;    mov    cl,4            ; No do a mult by 16
  340. ;    shl    dx,cl            ; to top layer
  341. ;    shl    ax,cl            ; and initial height
  342. ;    add    bx,dx            ; Add x64 and x16 for x80
  343. ;    add    si,ax            ; do same with height
  344.  
  345.     mov    ax,0A000H
  346.     mov    es,ax
  347.     mov    di,cs:_WritePage    ;get start of buffer
  348.  
  349.     mov    ax,ds:_TopColor
  350.     mov    ah,al
  351.     shr    bx,1            ;only fill words
  352.     mov    cx,bx            ;get amount to fill in
  353.   rep    stosw
  354.     add    di,si            ;then skip amount of wall
  355.     mov    ax,ds:_BottomColor
  356.     mov    ah,al
  357.     mov    cx,bx
  358.   rep    stosw
  359.  
  360.  
  361. drw000:
  362.     xor    bx,bx            ;Initial loop/plane counter
  363.  
  364. drw010:
  365.     push    bx            ;save loop/plane counter
  366.     mov    VCOL,bx            ;Set beginning video column
  367.     mov    dx,3c5H
  368.     mov    al,byte ptr DGROUP:_lowmask[bx]
  369.     out    dx,al            ;select mask to write to
  370.     mov    si,offset _Walls    ; Point to wall array
  371.     shl    bx,1
  372.     shl    bx,1
  373.     shl    bx,1            ;x 8 for correct wall structure
  374.     add    si,bx
  375.  
  376.     mov    cx,80            ;Number of walls to display
  377. drw020:
  378.     push    ds            ;save data segment
  379.     push    si            ;save wall pointer
  380.     push    cx            ;save wall count
  381.     lodsw                ;Get bitmap number
  382.     xchg    ax,bx            ;use bx as the index
  383.     shl    bx,1
  384.     shl    bx,1            ;dword index into bitmap table
  385.     mov    di,word ptr DGROUP:_bMaps[bx]        ;offset to bitmap
  386.     mov    es,word ptr DGROUP:_bMaps[bx+2]        ;segment of bitmap
  387.     lodsw                ;get bitmap column to display
  388.     mov    cl,6
  389.     shl    ax,cl            ;x64 to get correct row
  390.     add    di,ax            ;and add to bitmap offset
  391.     lodsw                ;get bitmap distance
  392.     shl    ax,1            ; Make word index for table lookup
  393.     mov    si,ax            ;save distance
  394.     mov    bx,word ptr DGROUP:_DistanceTable[si]  ;get height of bitmap
  395.  
  396.     mov    cx,100
  397.     mov    ax,bx            ; Pick up the height
  398.     shr    ax,1            ; Divide by two
  399.     sub    cx,ax            ; And subtract from center for Y1
  400.  
  401.     mov    ax,cx            ; Start with Y1
  402.     add    ax,bx            ; and add height to it for Y2
  403.  
  404.     cmp    ax,199            ; Don't let Y2 go beyond screen height
  405.     jle    short drw030
  406.     mov    ax,199            ; Else force it to screen height
  407. drw030:
  408.     mov    Y2,ax            ;save y2
  409.     shl    si,1            ; Turn object distance into dword index
  410.  
  411.     mov    ax,word ptr DGROUP:_AdjustTable[si+2]
  412.     mov    dx,word ptr DGROUP:_AdjustTable[si]
  413.  
  414.     mov    AVHI,ax            ; Get (64 * 65536) / height
  415.     mov    AVLOW,dx
  416.     xchg    si,di            ;si now points to bitmap
  417.     mov    di,VCOL            ; Video column to display at
  418.     sar    di,1            ; Divide by 4 to get correct planar col
  419.     sar    di,1            ; Divide by 4 to get correct planar col
  420.     add    di,word ptr cs:_WritePage ; Add in page offset
  421.     mov    ax,es            ; Pick up segment to bitmap
  422.     mov    ds,ax            ; now ds:si points to bitmap
  423.     mov    ax,0A000H        ; Video segment
  424.     mov    es,ax            ; now es:di points to screen
  425.     mov    word ptr BOFFLOW,0    ; Initialize the current bitmap offset
  426.     mov    word ptr BOFFHI,0
  427.  
  428.     cmp    cx,word ptr Y2        ; is Y1 > Y2?
  429.     jge    short drw090        ; Yes, get on out
  430.     or    cx,cx            ; Y1 <= 0?
  431.     jle    drw050            ; Yes, no sky color needed
  432.  
  433. ;    mov    ax,cx            ; Get copy of Y1
  434. ;    mov    bx,cx            ; and another copy
  435. ;    mov    cl,6
  436. ;    shl    ax,cl            ; do a mult 64
  437. ;    add    di,ax            ; and add to video offset
  438. ;    mov    cl,4
  439. ;    mov    ax,bx            ; get original Y1
  440. ;    shl    ax,cl            ; do a mult 16
  441. ;    add    di,ax            ; and add to video for a mult 80
  442. ;    xchg    cx,bx            ; restore original Y1
  443.  
  444.     mov    ax,90
  445.     imul    cx
  446.     add    di,ax
  447.  
  448. drw050:
  449.     mov    bx,89            ; Offset to next video row
  450.     mov    dx,AVLOW        ; Hold onto lsb of adjustment
  451.     mov    ax,AVHI            ; Pick up msb of bitmap adjustment
  452.  
  453. ;------------------------------------------------------------------------------
  454. ; Here is where the actual bitmap is transferred to the screen. Better
  455. ; optimization could be done by precalculating the adjustment factor instead
  456. ; of looping until Y1 >= 0. This has not been tried so I don't know if the
  457. ; speed would make it worth it....
  458. ;------------------------------------------------------------------------------
  459. drw060:
  460.     or    cx,cx            ; Is Y1 still < 0 ?
  461.     jl    short drw070        ; Yes, don't start drawing yet
  462.  
  463.     movsb                ;Move bitmap to video
  464.     dec    si
  465.     add    di,bx            ;next row of video
  466.  
  467. drw070:
  468.     add    word ptr BOFFLOW,dx    ; Add lsb to current offset
  469.     adc    si,ax            ; Use msb to get next bitmap location
  470.     inc    cx            ; Next y1
  471.     cmp    cx,word ptr Y2        ; Beyond Y2 yet?
  472.     jl    short drw060        ; Nope, keep looping
  473.  
  474. drw090:
  475.     pop    cx            ;get wall count
  476.     pop    si            ;recover structure pointer
  477.     pop    ds
  478.     add    si,32            ;Wall structure size * 4
  479.     add    word ptr VCOL,4        ;next video column to display at
  480.     dec    cx
  481.     jz    drw100
  482.     jmp    drw020            ;next wall to display
  483.  
  484. drw100:
  485.     pop    bx            ;recover loop/plane counter
  486.     inc    bx
  487.     cmp    bx,4            ;all 4 planes?
  488.     je    drwDone
  489.     jmp    drw010
  490.  
  491. drwDone:
  492.     mov    dx,3c5H
  493.     mov    al,0FFH            ;Enable all planes again
  494.     out    dx,al
  495.     pop    di
  496.     pop    si
  497.     pop    ds
  498.     mov    sp,bp
  499.     pop    bp
  500.     ret
  501. _DrawWalls endp
  502.  
  503. ;==============================================================================
  504. ;              +4         +6        +8        +10           +12
  505. ;  void DrawOneObject(int ObjNum,int ObjCol,int ObjDist,int VidCol,int PageNum);
  506. ;==============================================================================
  507. PBEGIN    _DrawOneObject
  508.     push    bp
  509.     mov    bp,sp
  510.     sub    sp,20
  511.     push    si
  512.     push    di
  513.     push    ds
  514.  
  515.     mov    cx,word ptr [bp+10]    ; Video column
  516.     and    cx,3            ; Only need lower three bits
  517.     mov    ah,11h
  518.     rol    ah,cl
  519.     mov    al,2
  520.     mov    dx,3c4h
  521.     out    dx,ax
  522.  
  523.     mov    bx,word ptr [bp+8]    ; Get the distance to the bitmap
  524.     shl    bx,1            ; Make word index for table lookup
  525.     mov    si,bx            ; Save index for now
  526.     mov    bx,word ptr DGROUP:_DistanceTable[bx]
  527.  
  528. dob010:
  529.     mov    cx,100
  530.     mov    ax,bx            ; Pick up the height
  531.     shr    ax,1            ; Divide by two
  532.     sub    cx,ax            ; And subtract from center for Y1
  533.  
  534.     mov    di,cx            ; Start with Y1
  535.     add    di,bx            ; and add height to it for Y2
  536.  
  537.     cmp    di,199            ; Don't let Y2 go beyond screen height
  538.     jle    short dob020
  539.     mov    di,199            ; Else force it to screen height
  540.  
  541. dob020:
  542.     mov    word ptr [bp-2],di  ;save y2
  543.     shl    si,1            ; Turn object distance into dword index
  544.  
  545.     mov    ax,word ptr DGROUP:_AdjustTable[si+2]
  546.     mov    dx,word ptr DGROUP:_AdjustTable[si]
  547.  
  548.     mov    word ptr [bp-14],ax    ; Get (64 * 65536) / height
  549.     mov    word ptr [bp-16],dx
  550.  
  551.     mov    bx,word ptr [bp+4]    ; Bitmap number to display
  552.     shl    bx,1            ; dword index
  553.     shl    bx,1            ; dword index
  554.     mov    ax,word ptr DGROUP:_oMaps[bx+2]
  555.     mov    dx,word ptr DGROUP:_oMaps[bx]
  556.  
  557.     mov    bx,word ptr [bp+6]    ; Bitmap column to display
  558.     shl    bx,1
  559.     shl    bx,1
  560.     shl    bx,1
  561.     shl    bx,1
  562.     shl    bx,1
  563.     shl    bx,1            ; x 64 to get correct bitmap row
  564.     add    dx,bx            ; then add to start of bitmap
  565.     mov    word ptr [bp-6],ax
  566.     mov    word ptr [bp-8],dx
  567.  
  568.     mov    di,word ptr [bp+10]    ; Video column to display at
  569.     sar    di,1            ; Divide by 4 to get correct planar col
  570.     sar    di,1            ; Divide by 4 to get correct planar col
  571.     mov    bx,word ptr [bp+12]    ; Page number to display at
  572.     shl    bx,1            ; Make a word index
  573.     add    di,word ptr DGROUP:_PageBegin[bx]   ;Pick up actual offset
  574.     mov    ax,0A000H        ; Video segment
  575.     mov    es,ax
  576.     mov    word ptr [bp-18],0    ; Initialize the current bitmap offset
  577.     mov    word ptr [bp-20],0
  578.  
  579.     or    cx,cx            ; Is Y1 > 0 ?
  580.     jle    short dob030        ; Nope, start above video
  581.  
  582. ;    xchg    si,cx            ; hold onto original value
  583. ;    mov    ax,si            ; get Y1 coordinate
  584. ;    mov    cl,6            ; mult by 64
  585. ;    shl    ax,cl
  586. ;    mov    dx,si            ; get back Y1
  587. ;    mov    cl,4
  588. ;    shl    dx,cl            ; mult by 16
  589. ;    add    ax,dx            ; now add to Y1 * 64 to get Y1 * 80
  590. ;    add    di,ax            ; and add to start of video
  591. ;    xchg    cx,si            ; get back original Y1
  592.  
  593.     mov    ax,90
  594.     imul    cx
  595.     add    di,ax
  596.  
  597. dob030:
  598.     cmp    cx,word ptr [bp-2]    ; is Y1 > Y2?
  599.     jge    short dob090        ; Yes, get on out
  600.  
  601.     mov    bx,90            ;Amount to next row of video
  602.     lds    si,dword ptr [bp-8]    ;Get image buffer
  603.     mov    dx,word ptr [bp-16]    ; Hold onto lsb of adjustment
  604.  
  605. dob040:
  606.     or    cx,cx            ; Is Y1 still < 0 ?
  607.     jl    short dob080        ; Yes, don't start drawing yet
  608.  
  609.     lodsb
  610.     dec    si
  611.     or    al,al            ;Transparent color?
  612.     jz    dob050            ;Yes, don't write it to video
  613.     mov    byte ptr es:[di],al    ;place character in video
  614.  
  615. dob050:
  616.     add    di,bx            ;next row of video
  617.  
  618. dob080:
  619.     mov    ax,word ptr [bp-14]    ; Pick up msb of bitmap adjustment
  620.     add    word ptr [bp-20],dx    ;   and add to current offset
  621.     adc    si,ax            ; Keep the msb correct
  622.     inc    cx            ; Next y1
  623.     cmp    cx,word ptr [bp-2]    ; Beyond Y2 yet?
  624.     jl    short dob040        ; Nope, keep looping
  625.  
  626. dob090:
  627.     pop    ds
  628.     pop    di
  629.     pop    si
  630.     mov    sp,bp
  631.     pop    bp
  632.     ret
  633. _DrawOneObject      endp
  634.  
  635.  
  636. _TEXT    ENDS
  637.     END
  638.  
  639.