home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / assemblr / library / sampler0 / display.asm < prev    next >
Assembly Source File  |  1987-10-20  |  13KB  |  575 lines

  1.  
  2. TITLE    DISPLAY
  3. ;  by Douglas Clark and William C. Parke (c) Copyright 1987
  4. ;
  5. ; Quick display of a page of a file on screen with special attributes
  6. ;
  7. PUBLIC    START,BEGIN
  8.  
  9. CODE    SEGMENT
  10.     ASSUME    CS:CODE,DS:CODE
  11.     ORG    100H
  12. ;
  13. CR    EQU    0DH
  14. LF    EQU    0AH
  15. ;
  16. START:    JMP    BEGIN
  17. ;
  18. PAG_MAR    DB    '^'        ; page marker
  19. ATR_SYM    DB    '\'        ; attribute symbol with start/stop codes
  20.  
  21.     DB    14 DUP(0)
  22.     DB    1AH
  23. FILNAM    DB    80 DUP(0)
  24. PAGIDF    DB    0
  25.     DB    0
  26. PAGIDS    DW    0
  27. PAGID    DB    32 DUP(0)
  28. FHAN    DW    0
  29. PAG_START    DW    0
  30. PAG_SIZ        DW    0
  31. VID_SEG    DW    0B000H            ; mono addr for    direct video
  32. PGPTR    DW    0
  33. PGADR    DB    256 DUP(0)
  34.  
  35. HELP:    AND    AL,AL            ; any error messages?
  36.     JZ    HELP1
  37.     XOR    AH,AH
  38.     PUSH    AX
  39.     DEC    AL
  40.     SHL    AX,1
  41.     MOV    BX,AX
  42.     MOV    DX,WORD    PTR ERR_TBL[BX]
  43.     MOV    AH,9H
  44.     INT    21H
  45.     POP    AX
  46.     MOV    AH,4CH
  47.     INT    21H            ; exit
  48.  
  49. HELP1:    MOV    DX,OFFSET DHELP
  50.     MOV    AH,9
  51.     INT    21H
  52.     MOV    AX,4C00H
  53.     INT    21H            ; EXIT clean
  54.  
  55. BEGIN:    CALL    COMMAND_LN        ; get screen file name and page    id
  56.     JC    HELP
  57.     CALL    OPENF            ; open screen file
  58.     JC    HELP
  59.     CALL    VID_MEM            ; get video memory address
  60.     CALL    READF
  61.     JC    HELP
  62.     MOV    SI,OFFSET PAGID
  63.     MOV    DI,OFFSET FILBUF
  64.     MOV    PAG_START,DI        ; default begin    address
  65.     MOV    CX,WORD    PTR FILBUFL
  66.     MOV    PAG_SIZ,CX        ; default size
  67.     TEST    BYTE PTR PAGIDF,1    ; test if page id is present
  68.     JZ    VID5            ; show whole file
  69.     CALL    STRSEARCH        ; look for page    id
  70.     JC    HELP
  71.     MOV    PAG_START,DX        ; save addr. of    hit from search
  72.     MOV    AX,DI
  73.     SUB    AX,DX            ; new size
  74.     JC    HELP1
  75.     MOV    PAG_SIZ,AX        ; save new size
  76. VID5:    MOV    SI,PAG_START        ; SI->filbuf (or page therein)
  77.     MOV    AX,SI
  78.     MOV    DI,OFFSET PGADR
  79.     STOSW
  80.     XOR    AX,AX
  81.     MOV    CX,126
  82.     REP    STOSW            ; zero beyond first addr
  83.     MOV    WORD PTR PGPTR,AX    ; zero the initial page ptr
  84.     MOV    AX,VID_SEG
  85.     MOV    ES,AX
  86. VIDR:    MOV    BX,PGPTR        ; current page index into pgadr
  87.     MOV    SI,WORD PTR PGADR[BX]    ; get address of page
  88.     AND    SI,SI
  89.     JNZ    VIDRN
  90.     SUB    BX,2
  91.     MOV    PGPTR,BX
  92.     MOV    SI,WORD PTR PGADR[BX]
  93. VIDRN:    CALL    CLRSCN
  94.     MOV    BX,DI            ; save di
  95.     MOV    DX,23            ; maximum lines
  96. VID7:    LODSB
  97. VID7C:    CMP    AL,LF            ; skip Line Feeds
  98.     JZ    VID7
  99.     CMP    AL,CR            ; chk Carr.Ret.
  100.     JNZ    VID8            ;  no
  101.     MOV    DI,BX            ; yes
  102.     ADD    DI,(80*2)        ; bump to next line on screen
  103.     MOV    BX,DI
  104.     DEC    DX            ; 23-row count
  105.     JNZ    VID7
  106.     JMP    SHORT VID9
  107. VID8:    CMP    AL,1AH            ; chk e-o-f
  108.     JZ    VID9F
  109.     CMP    AL,'\'            ; control code?
  110.     JNZ    VIDS
  111.     CMP    BYTE PTR [SI],'\'    ; cancel?
  112.     JZ    VIDSC
  113.     CALL    CODES
  114.     JMP    SHORT VID7C
  115. VIDSC:    INC    SI
  116. VIDS:    OR    AL,0
  117. OCMASK    EQU    $-1
  118.     STOSB
  119.     MOV    AL,ATTRIB        ; get attribute
  120.     STOSB                ; store attrib.
  121.     JMP    SHORT VID7        ; loop
  122. VID9F:    XOR    SI,SI            ; no more
  123.     MOV    BX,PGPTR
  124.     AND    BX,BX
  125.     JZ    VID10
  126.     TEST    BYTE PTR PAGIDF,1
  127.     JNZ    VID10
  128. VID9:    MOV    BX,PGPTR
  129.     INC    BX            ; next page
  130.     INC    BX
  131.     MOV    PGPTR,BX
  132.     MOV    WORD PTR PGADR[BX],SI    ; save ptr to next page
  133.     JMP    SHORT VID16
  134. VID9U:    MOV    BX,PGPTR
  135.     SUB    BX,4
  136.     JNC    VID9V
  137.     XOR    BX,BX
  138. VID9V:    MOV    PGPTR,BX
  139.     JMP    VIDR
  140. VID10:    MOV    AX,CS
  141.     MOV    ES,AX            ; restore ES
  142.     MOV    AX,DI            ; current screen byte count
  143.     XOR    DX,DX
  144.     MOV    CX,80*2            ; bytes for rows
  145.     DIV    CX            ; ax= rows, dx= remainder
  146.     SHR    DX,1            ; column in dl
  147.     MOV    DH,AL            ; row in dh
  148.     MOV    AH,02H            ; locate
  149.     MOV    BH,00H            ; curr screen
  150.     INT    10H
  151.     MOV    AX,4C00H
  152.     INT    21H            ; terminate program
  153.  
  154. VID16:    MOV    AH,0
  155.     INT    16H
  156.     CMP    AX,5100H        ; PgDn
  157.     JZ    VID16R
  158.     CMP    AX,4900H        ; PgUp
  159.     JZ    VID9U
  160.     CMP    AX,011BH        ; esc
  161.     JZ    VID10
  162.     CMP    AX,2E03H        ; ^C
  163.     JZ    VID10
  164.     CMP    AX,4700H        ; home
  165.     JZ    VIDHOM
  166.     CMP    AX,4F00H        ; end
  167.     JZ    VIDEND
  168.     JMP    SHORT VID16
  169. VID16R:    JMP    VIDR
  170. VIDHOM:    MOV    WORD PTR PGPTR,0
  171.     JMP    VIDR
  172. VIDEND:    XOR    AX,AX
  173.     MOV    BX,AX
  174.     SUB    BX,2
  175.     MOV    CX,129
  176. VIDENS:    ADD    BX,2
  177.     CMP    WORD PTR PGADR[BX],AX    ; look for first zero address
  178.     LOOPNZ    VIDENS
  179.     JCXZ    VID10
  180.     SUB    BX,2            ; addr just before is 'end' one
  181.     MOV    PGPTR,BX        ; use counter for ptr
  182.     JMP    VIDR
  183. ;
  184. ;---------------------------------------------------------------
  185. STRSEARCH:
  186. ; Input: SI= pagid string    Output:    DX= found page position
  187. ;     DI= file buffer        DI= end    of page    pointer
  188. ;     CX= file buffer size
  189. ;---------------------------------------------------------------
  190.     CLD                ;forward direction
  191. STRSR0:    CALL    SYMSEARCH        ; search for pag symbol
  192.     JNC    STRSR1
  193.     MOV    AL,3            ; error: no page symbol
  194.     RET
  195. STRSR1:    PUSH    CX            ; save buffer length
  196.     MOV    CX,PAGIDS
  197.     INC    CX
  198.     PUSH    SI
  199.     REPZ    CMPSB            ; search for page id
  200.     POP    SI
  201.     AND    CX,CX            ; did we find it?
  202.     POP    CX            ; get back file    length remaining
  203.     JNZ    STRSR0            ; not yet
  204.     MOV    DX,DI            ; save address of first page
  205.     CALL    SYMSEARCH
  206.     DEC    DI
  207.     MOV    WORD PTR [DI-1],1A1AH
  208.     XOR    AX,AX
  209.     RET
  210.  
  211. SYMSEARCH:
  212. ; find page break symbol in buffer
  213.     MOV    AL,PAG_MAR
  214. SYMSR0:    REPNZ    SCASB
  215.     AND    CX,CX
  216.     JNZ    SYMSR2
  217. SYMSR1:
  218.     STC
  219.     RET
  220. SYMSR2:
  221.     DEC    CX
  222.     JZ    SYMSR1
  223.     SCASB
  224.     JNZ    SYMSR0
  225.     RET
  226.  
  227. ;---------------------------------------------------------------
  228. COMMAND_LN:
  229. ; Input: none        Output:    Command    line file name in FILNAM
  230. ;                Page code in PAGID
  231. ;---------------------------------------------------------------
  232.     MOV    SI,80H            ; get command string buffer
  233.     LODSB                ; get command string size
  234.     AND    AL,AL            ; anything there?
  235.     JNZ    CMDLN1            ; ok, there is a string
  236.     XOR    AL,AL            ; no error message
  237.     STC
  238.     RET
  239. CMDLN1:    XOR    CH,CH            ; zero ch
  240.     MOV    CL,AL            ; put size in cx
  241.     INC    CX
  242.     MOV    DI,OFFSET FILNAM    ; buffer for asciz filename
  243. CMDLN2:    LODSB                ; get byte from    command    string
  244.     CMP    AL,20H            ; see if its a space
  245.     LOOPZ    CMDLN2            ; skip if so
  246.     AND    CX,CX            ; are we at end    of string?
  247.     JNZ    CMDLNL            ; not yet
  248. CMDLNS:    XOR    AL,AL            ; no error message
  249.     STC
  250.     RET
  251. CMDLNL:    STOSB                ; save file name byte
  252.     LODSB                ; get next byte
  253.     CMP    AL,'/'            ; switch?
  254.     JNZ    CMDLN4            ; no
  255.     XOR    AL,AL
  256.     STOSB
  257.     DEC    CX
  258.     JMP    SHORT CMDLNA        ; look for page    number
  259. CMDLNT:    XOR    AL,AL
  260.     STOSB
  261.     RET
  262. CMDLN4:    CMP    AL,20H            ; space?
  263.     JZ    CMDLN5
  264.     CMP    AL,CR
  265.     JZ    CMDLNT
  266.     CMP    AL,';'
  267.     LOOPNZ    CMDLNL
  268.     JMP    SHORT CMDLNT
  269. CMDLN5:    XOR    AL,AL
  270.     STOSB
  271.     JCXZ    CMDLNT
  272. CMDLN8:    LODSB
  273.     CMP    AL,20H
  274.     JZ    CMDLN9
  275.     CMP    AL,';'
  276.     JZ    CMDLNT
  277.     CMP    AL,CR
  278.     JZ    CMDLNT
  279.     CMP    AL,'/'
  280.     JZ    CMDLNA
  281. CMDLN9:    LOOP    CMDLN8
  282.     JMP    SHORT CMDLNT
  283. CMDLNA:    CMP    CX,3
  284.     JC    CMDLNM
  285. CMDLNC:    LODSW                ; get '=p'
  286.     SUB    CX,2
  287.     AND    AL,5FH
  288.     CMP    AX,3D50H
  289.     JZ    CMDLND
  290. CMDLNM:    MOV    AL,1            ; invalid switch
  291.     STC
  292.     RET
  293. CMDLND:    MOV    DI,OFFSET PAGID
  294.     XOR    BX,BX            ; count    of pagid
  295. CMDLNF:    LODSB
  296.     CMP    AL,' '
  297.     JZ    CMDLNE
  298.     CMP    AL,CR
  299.     JZ    CMDLNE
  300.     CMP    AL,';'
  301.     JZ    CMDLNE
  302.     INC    BX
  303.     STOSB
  304.     LOOP    CMDLNF            ; save page id
  305. CMDLNE:    MOV    AL,PAG_MAR
  306.     STOSB                ; add ^^ to end
  307.     INC    BX
  308.     STOSB
  309.     INC    BX
  310.     MOV    PAGIDS,BX        ; save size of id
  311.     MOV    BYTE PTR PAGIDF,1    ; set flag
  312.     XOR    AX,AX
  313.     STOSB
  314.     RET
  315.  
  316. ;---------------------------------------------------------------
  317. OPENF:
  318. ; Input: none        Output:     File handle in    FHAN
  319. ;---------------------------------------------------------------
  320.     MOV    DX,OFFSET FILNAM    ; DX ->    input file name
  321.     MOV    AX,3D00H        ; open for input
  322.     INT    21H
  323.     JNC    OPN1
  324.     MOV    AL,2            ; error    opening    file
  325.     RET
  326. OPN1:    MOV    FHAN,AX            ; save handle
  327.     RET
  328.  
  329. ;---------------------------------------------------------------
  330. CLRSCN:
  331. ; Input: none        Output:     none
  332. ;---------------------------------------------------------------
  333.     MOV    CX,0000H        ; row,col
  334.     MOV    DX,184FH        ; row,col
  335.     MOV    AX,0600H        ; CLS clear screen
  336.     MOV    BH,07H            ; normal
  337.     INT    10H
  338.     MOV    DX,1800H        ; column in dl, row in dh
  339.     MOV    AH,02H            ; locate
  340.     MOV    BH,00H            ; curr screen
  341.     INT    10H
  342.     XOR    DI,DI            ; start at top of screen
  343.     RET
  344.  
  345. ;---------------------------------------------------------------
  346. VID_MEM:
  347. ; Input: none        Output:     Active    video memory address in    VID_SEG
  348. ;---------------------------------------------------------------
  349.     MOV    AX,40H            ; bios data segment
  350.     PUSH    DS
  351.     MOV    DS,AX            ; DS ->    bios data seg.
  352.     CMP    WORD PTR DS:63H,03B4H    ; If Mono...    (everex-cga=03D4 )
  353.     POP    DS
  354.     JZ    VIDM1
  355.     ADD    WORD PTR VID_SEG,0800H    ; adj. for CGA
  356. VIDM1:    RET
  357.  
  358. ;---------------------------------------------------------------
  359. READF:
  360. ; Input: none        Output:     FILBUF    filled with file of length FILBUFL
  361. ;---------------------------------------------------------------
  362.     MOV    DX,OFFSET FILBUF    ; DX ->    file buffer
  363.     MOV    AX,3F00H        ;
  364.     MOV    BX,FHAN
  365.     MOV    CX,0C000H        ; Read 48k
  366.     INT    21H            ;
  367.     JNC    READ11
  368.     MOV    AL,4            ; bad read
  369.     RET
  370. READ11:
  371.     MOV    WORD PTR FILBUFL,AX    ; save length of file
  372.     ADD    AX,DX            ; append
  373.     DEC    AX            ;   ^Z (eof)
  374.     MOV    BX,AX            ;     to the end
  375.     MOV    WORD PTR [BX],1A1AH    ;    of the data.
  376.     MOV    BX,FHAN
  377.     MOV    AX,3E00H        ; close    handle
  378.     INT    21H
  379.     RET
  380.  
  381. ;---------------------------------------------------------------
  382. CODES:
  383. ; Input: SI=file buffer at /+1        Output:    set attribute of AL
  384. ;---------------------------------------------------------------
  385.     MOV    AL,[SI]            ; get /+1 char
  386.     PUSH    CX            ; save cx
  387.     PUSH    DI            ; save di
  388.     PUSH    ES
  389.     PUSH    DS
  390.     POP    ES
  391.     MOV    DI,OFFSET COD_TBL    ; point to / codes
  392.     MOV    CX,17
  393.     REPNZ    SCASB
  394.     POP    ES
  395.     POP    DI
  396.     AND    CX,CX
  397.     MOV    AH,CL            ; save 16-count in ah
  398.     POP    CX
  399.     JNZ    CODE1            ; jmp if we found one
  400.     RET                ; return with orig. char
  401. CODE1:    INC    SI            ; point to /+2
  402.     PUSH    BX            ; save bx
  403.     MOV    BX,16
  404.     SUB    BL,AH
  405.     CMP    BX,8
  406.     JNC    CODOFF            ; must be a lower case off switch
  407.     AND    BX,BX
  408.     JZ    CODET            ; if its zero, must be A switch
  409.     CMP    BX,6
  410.     JNC    CODEC            ; if its above 5, must be color
  411.     MOV    AL,COD_MSK[BX]        ; get mask
  412.     CMP    BL,5
  413.     JNC    CODAH            ; a hide request
  414.     CMP    BL,3
  415.     JC    CODOA            ; A, I, or B request
  416.     SUB    BL,3
  417.     JZ    CODAA            ; process U request
  418.     OR    BYTE PTR ATTRIB,AL
  419.     MOV    AL,11111000B        ; and for reverse
  420. CODAA:    AND    BYTE PTR ATTRIB,AL
  421.     POP    BX
  422.     LODSB                ; get /+2 char
  423.     RET
  424. CODOA:    OR    BYTE PTR ATTRIB,AL    ; turn on attribute requested
  425.     POP    BX
  426.     LODSB
  427.     RET
  428.  
  429. CODAH:    MOV    AL,BYTE PTR ATTRIB
  430.     MOV    ATTRH,AL        ; save a copy of the attr byte
  431.     MOV    BYTE PTR ATTRIB,0
  432.     POP    BX
  433.     LODSB
  434.     RET
  435.  
  436. CODOH:    MOV    AL,BYTE PTR ATTRH
  437.     AND    AL,AL            ; test if non-zero
  438.     JNZ    CODOH1
  439.     MOV    AL,07H            ; use default attribute
  440. CODOH1:    MOV    BYTE PTR ATTRIB,AL    ; restore copy of attr byte
  441.     POP    BX
  442.     LODSB
  443.     RET
  444.  
  445. CODET:    MOV    BYTE PTR OCMASK,10000000B
  446.     POP    BX
  447.     LODSB
  448.     RET
  449. CODEU:    MOV    BYTE PTR OCMASK,00000000B
  450.     POP    BX
  451.     LODSB
  452.     RET
  453.  
  454. CODOFF:    SUB    BX,8            ; get displacement for off switch
  455.     JZ    CODEU            ; request to turn off alter. char.
  456.     CMP    BX,6
  457.     JNC    CODEC            ; color request
  458.     MOV    AL,COD_MSK[BX]        ; get mask
  459.     NOT    AL            ; reverse bits
  460.     CMP    BL,5
  461.     JNC    CODOH            ; or attribute to unhide
  462.     CMP    BL,3
  463.     JC    CODAA            ; A, I, or B request
  464.     SUB    BL,3
  465.     JZ    CODOA            ; process U request
  466.     AND    BYTE PTR ATTRIB,AL
  467.     MOV    AL,00000111B        ; or for reverse off
  468.     JMP    SHORT CODOA
  469.  
  470. CODEC:    MOV    BYTE PTR SHIFT,0    ; assume foreground
  471.     SUB    BL,6            ; see if C or S
  472.     JZ    CODESS            ; do foreground Char. color
  473.     MOV    BYTE PTR SHIFT,4    ; set up background S shift
  474. CODESS:    MOV    AL,[SI]            ; get /+2
  475.     OR    AL,' '            ; make lower case
  476.     PUSH    DI
  477.     PUSH    ES
  478.     PUSH    DS
  479.     POP    ES
  480.     PUSH    CX
  481.     MOV    DI,OFFSET COLOR_T
  482.     MOV    CX,8
  483.     REPNZ    SCASB
  484.     AND    CX,CX
  485.     MOV    AH,CL
  486.     POP    CX
  487.     POP    ES
  488.     POP    DI
  489.     JZ    CODESE
  490.     INC    SI            ; point to /+3
  491.     MOV    BX,7
  492.     SUB    BL,AH
  493.     MOV    AL,COLOR_M[BX]        ; get color bit mix
  494.     MOV    AH,11111000B        ; mask for foreground
  495.     TEST    BYTE PTR SHIFT,4
  496.     JZ    CODESU            ; no shift needed for foreground
  497.     PUSH    CX
  498.     XOR    CX,CX
  499.     MOV    CL,SHIFT
  500.     SHL    AL,CL
  501.     POP    CX
  502.     MOV    AH,10001111B        ; mask for background
  503. CODESU:    AND    BYTE PTR ATTRIB,AH
  504.     OR    BYTE PTR ATTRIB,AL
  505.     POP    BX
  506.     LODSB                ; get next real character
  507.     RET
  508. CODESE:    DEC    SI
  509.     POP    BX
  510.     MOV    AL,[SI]            ; restore /+1 char.
  511.     RET
  512. ATTRIB    DB    7            ; normal attribute
  513. ATTRH    DB    0
  514.  
  515. COD_TBL    DB    'AIBURHCS'
  516.     DB    'aiburhcs',0
  517. COLOR_T    DB    'bgtrvpw',0,0
  518. COD_MSK    DB    10000000B        ; alternate char. set bit or
  519.     DB    00001000B        ; intensity bit or
  520.     DB    10000000B        ; blinking bit or
  521.     DB    11111001B        ; underline bit and
  522.     DB    01110000B        ; reverse video bits and
  523.     DB    00000000B        ; hide byte and
  524.     DB    00000111B        ; foreground bits
  525.     DB    01110000B        ; background bits
  526.  
  527. COLOR_M    DB    00000001B        ; blue
  528.     DB    00000010B        ; green
  529.     DB    00000011B        ; turquoise
  530.     DB    00000100B        ; red
  531.     DB    00000101B        ; violet
  532.     DB    00000110B        ; pink
  533.     DB    00000111B        ; white
  534. SHIFT    DB    0
  535.     DW    0
  536.  
  537. ERR_TBL    DW    ERRSW
  538.     DW    NOFILE
  539.     DW    NOPAGE
  540.     DW    ERREAD
  541.  
  542. ERRSW    DB    CR,LF,'Invalid switch on command line.',CR,LF,'$'
  543. NOFILE    DB    CR,LF,'Cannot open file.',CR,LF,'$'
  544. NOPAGE    DB    CR,LF,'Page Not Found.',CR,LF,'$'
  545. ERREAD    DB    CR,LF,'Error reading file.',CR,LF,'$'
  546.  
  547. MARKEND    EQU    $
  548. DHELP    DB    CR,LF
  549.  DB '            DISPLAY  Version 1.1',CR,LF
  550.  DB ' ',CR,LF
  551.  DB '          A fast file to screen displayer',CR,LF
  552.  DB '          by Douglas Clark and W.C. Parke',CR,LF
  553.  DB '                  (c) 1987',CR,LF           
  554.  DB ' ',CR,LF
  555.  DB 'Syntax: DISPLAY filename [/P=pageid]',CR,LF
  556.  DB '      where  filename is a valid file to display,',CR,LF
  557.  DB '             pageid   is a page identification string',CR,LF
  558.  DB '             embedded in the file, with a pair of',CR,LF
  559.  DB '             carots (^^) on prefix and suffix.',CR,LF
  560.  DB '      Embed ''\x'' controls in text for enhanced text:',CR,LF
  561.  DB '      Monochrome:  Start Stop    Color: Character Screen',CR,LF
  562.  DB '       hide           \H   \h      blue       \cb    \sb',CR,LF
  563.  DB '       underline      \U   \u      green      \cg    \sg',CR,LF
  564.  DB '       reverse video  \R   \r      turquoise  \ct    \st',CR,LF
  565.  DB '       blinking       \B   \b      red        \cr    \sr',CR,LF
  566.  DB '       intense        \I   \i      violet     \cv    \sv',CR,LF
  567.  DB '       alternate ibm-              pink       \cp    \sp',CR,LF
  568.  DB '        character set \A   \a      white      \cw    \sw',CR,LF,'$'
  569.  
  570. FILBUFL    EQU    MARKEND               ; length    of file
  571. FILBUF    EQU    FILBUFL+2           ; 1st 48k of file
  572. ;
  573. CODE    ENDS
  574.     END    START
  575.