Annotation of sbbs/lciol/lclio.lst, revision 1.1

1.1     ! root        1: Microsoft (R) Macro Assembler Version 5.10                  3/15/92 16:02:55
        !             2:                                                              Page     1-1
        !             3: 
        !             4: 
        !             5:                                        page    60,132
        !             6:                                        .model  large
        !             7:                                
        !             8:                                ; Put character to console (local)
        !             9:                                
        !            10:                                        .data
        !            11:  0000  4F                      wid     db      79              ;columns per screen (zero based)
        !            12:  0001  18                      lps     db      24              ;lines per screen (zero based)
        !            13:  0002  00                      col     db      0               ;current column
        !            14:  0003  00                      lin     db      0               ;current line
        !            15:  0004  07                      atr     db      7               ;current attribute
        !            16:  0005  00                      pag     db      0               ;current display page
        !            17:                                
        !            18:                                        .code
        !            19:                                        .8086
        !            20:                                
        !            21:                                        public  _lputc,_lputs,_lclini,_lclxy,_lclwx,_lclwy,_lclatr
        !            22:                                
        !            23:  0000                          _lclini proc
        !            24:  0000  55                              push    bp
        !            25:  0001  8B EC                           mov     bp,sp
        !            26:  0003  8B 46 06                                mov     ax,[bp+6]       ;fetch parameter 1 (16-bit int)
        !            27:  0006  FE C8                           dec     al
        !            28:  0008  A2 0001 R                       mov     lps,al          ;set lines per screen
        !            29:  000B  B4 0F                           mov     ah,0fh
        !            30:  000D  CD 10                           int     10h             ;get video mode
        !            31:  000F  FE CC                           dec     ah
        !            32:  0011  88 26 0000 R                    mov     wid,ah          ;set screen width
        !            33:  0015  88 3E 0005 R                    mov     pag,bh          ;set current display page
        !            34:  0019  B4 03                           mov     ah,3
        !            35:  001B  CD 10                           int     10h             ;get cursor position
        !            36:  001D  3A 36 0001 R                    cmp     dh,lps
        !            37:  0021  72 04                           jc      cuupd           ;current line within range
        !            38:  0023  8A 36 0001 R                    mov     dh,lps          ;else set to maximum
        !            39:  0027  B4 02                   cuupd:  mov     ah,2            ;set cursor and update current pointers
        !            40:  0029  CD 10                           int     10h             ;move cursor to last line
        !            41:  002B  89 16 0002 R                    mov     col,dx          ;set current column and line
        !            42:  002F  33 C0                           xor     ax,ax
        !            43:  0031  5D                              pop     bp
        !            44:  0032  CB                              ret
        !            45:  0033                          _lclini endp
        !            46:                                
        !            47:  0033                          _lclxy  proc
        !            48:  0033  55                              push    bp
        !            49:  0034  8B EC                           mov     bp,sp
        !            50:  0036  8B 56 06                                mov     dx,[bp+6]       ;get parameter 1, x (column)
        !            51:  0039  FE CA                           dec     dl
        !            52:  003B  88 16 0002 R                    mov     col,dl
        !            53:  003F  8B 46 08                                mov     ax,[bp+8]       ;get parameter 2, y (line)
        !            54:  0042  FE C8                           dec     al
        !            55:  0044  A2 0003 R                       mov     lin,al
        !            56:  0047  8A F0                           mov     dh,al
        !            57:  0049  8A 3E 0005 R                    mov     bh,pag
        !            58:  004D  B4 02                           mov     ah,2
        !            59:  004F  CD 10                           int     10h             ;set cursor
        !            60:  0051  33 C0                           xor     ax,ax
        !            61: Microsoft (R) Macro Assembler Version 5.10                  3/15/92 16:02:55
        !            62:                                                              Page     1-2
        !            63: 
        !            64: 
        !            65:  0053  5D                              pop     bp
        !            66:  0054  CB                              ret
        !            67:  0055                          _lclxy  endp
        !            68:                                
        !            69:  0055                          _lclwx  proc
        !            70:  0055  32 E4                           xor     ah,ah
        !            71:  0057  A0 0002 R                       mov     al,col          ;return x (column)
        !            72:  005A  FE C0                           inc     al
        !            73:  005C  CB                              ret
        !            74:  005D                          _lclwx  endp
        !            75:                                
        !            76:  005D                          _lclwy  proc
        !            77:  005D  32 E4                           xor     ah,ah
        !            78:  005F  A0 0003 R                       mov     al,lin          ;return y (line)
        !            79:  0062  FE C0                           inc     al
        !            80:  0064  CB                              ret
        !            81:  0065                          _lclwy  endp
        !            82:                                
        !            83:  0065                          _lclatr proc
        !            84:  0065  55                              push    bp
        !            85:  0066  8B EC                           mov     bp,sp
        !            86:  0068  32 E4                           xor     ah,ah
        !            87:  006A  A0 0004 R                       mov     al,atr          ;get old attribute in ax
        !            88:  006D  8B 56 06                                mov     dx,[bp+6]       ;fetch parameter 1 (16-bit int)
        !            89:  0070  88 16 0004 R                    mov     atr,dl          ;set current attribute
        !            90:  0074  5D                              pop     bp
        !            91:  0075  CB                              ret
        !            92:  0076                          _lclatr endp
        !            93:                                
        !            94:  0076                          _lputc  proc
        !            95:  0076  55                              push    bp
        !            96:  0077  8B EC                           mov     bp,sp
        !            97:  0079  8B 46 06                                mov     ax,[bp+6]       ;fetch parameter 1 (16-bit int)
        !            98:                                
        !            99:  007C  3D 0100                         cmp     ax,100h
        !           100:  007F  74 1C                           jz      clreol          ;clear to end of line
        !           101:  0081  3C 07                           cmp     al,7
        !           102:  0083  74 3E                           jz      outbl           ;bell
        !           103:  0085  3C 08                           cmp     al,8
        !           104:  0087  74 2C                           jz      outbs           ;backspace
        !           105:  0089  3C 0A                           cmp     al,10
        !           106:  008B  74 76                           jz      outlf           ;line feed
        !           107:  008D  3C 0C                           cmp     al,12
        !           108:  008F  74 3E                           jz      outcs           ;screen clear
        !           109:  0091  3C 0D                           cmp     al,13
        !           110:  0093  75 50                           jnz     nonctl          ;carriage return
        !           111:  0095  C6 06 0002 R 00                 mov     col,0           ;set column zero
        !           112:  009A  E9 0126 R                       jmp     updc
        !           113:                                
        !           114:  009D  B8 0920                 clreol: mov     ax,920h
        !           115:  00A0  8B 1E 0004 R                    mov     bx,atr          ;get page (bh) and attribute (bl)
        !           116:  00A4  8A 0E 0000 R                    mov     cl,wid          ;line length
        !           117:  00A8  2A 0E 0002 R                    sub     cl,col          ;get remainder
        !           118:  00AC  FE C1                           inc     cl              ;include current position
        !           119:  00AE  32 ED                           xor     ch,ch           ;replication factor in cx
        !           120:  00B0  CD 10                           int     10h             ;clear to end of line
        !           121: Microsoft (R) Macro Assembler Version 5.10                  3/15/92 16:02:55
        !           122:                                                              Page     1-3
        !           123: 
        !           124: 
        !           125:  00B2  EB 7E 90                                jmp     pexit
        !           126:                                
        !           127:  00B5  A0 0002 R               outbs:  mov     al,col
        !           128:  00B8  0A C0                           or      al,al
        !           129:  00BA  74 76                           jz      pexit           ;at column zero, no action
        !           130:  00BC  FE 0E 0002 R                    dec     col
        !           131:  00C0  EB 64 90                                jmp     updc            ;move cursor back one column
        !           132:                                
        !           133:  00C3  B8 0E07                 outbl:  mov     ax,0e07h        ;write in tty mode (ah) bell (al)
        !           134:  00C6  8B 1E 0004 R                    mov     bx,atr          ;get page (bh) and attribute (bl)
        !           135:  00CA  CD 10                           int     10h             ;beep
        !           136:  00CC  EB 58 90                                jmp     updc            ;make sure cursor is not changed
        !           137:                                
        !           138:  00CF  B8 0600                 outcs:  mov     ax,600h         ;scroll (clear screen)
        !           139:  00D2  8A 3E 0004 R                    mov     bh,atr          ;current attribute
        !           140:  00D6  33 C9                           xor     cx,cx           ;upper left corner of window (0,0)
        !           141:  00D8  8B 16 0000 R                    mov     dx,wid          ;lower right corner of window (wid,lps)
        !           142:  00DC  CD 10                           int     10h             ;scroll window up one line      
        !           143:  00DE  89 0E 0002 R                    mov     col,cx          ;new cursor
        !           144:  00E2  EB 42 90                                jmp     updc
        !           145:                                
        !           146:  00E5  B4 09                   nonctl: mov     ah,9
        !           147:  00E7  8B 1E 0004 R                    mov     bx,atr          ;get page (bh) and attribute (bl)
        !           148:  00EB  B9 0001                         mov     cx,1
        !           149:  00EE  CD 10                           int     10h             ;write char and attr at cursor position
        !           150:  00F0  8A 26 0002 R                    mov     ah,col
        !           151:  00F4  FE 06 0002 R                    inc     col             ;advance cursor on line
        !           152:  00F8  3A 26 0000 R                    cmp     ah,wid
        !           153:  00FC  72 28                           jc      updc            ;not at end of line, update cursor and exit
        !           154:                                
        !           155:  00FE  C6 06 0002 R 00                 mov     col,0           ;set column zero (cr)
        !           156:  0103  8A 26 0003 R            outlf:  mov     ah,lin
        !           157:  0107  3A 26 0001 R                    cmp     ah,lps
        !           158:  010B  72 15                           jc      upda            ;not at end of screen, update cursor and exit
        !           159:  010D  75 0F                           jnz     updn            ;past end of screen, cr only
        !           160:                                
        !           161:  010F  B8 0601                         mov     ax,601h         ;scroll (ah) number of lines (al)
        !           162:  0112  8A 3E 0004 R                    mov     bh,atr          ;current attribute
        !           163:  0116  33 C9                           xor     cx,cx           ;upper left corner of window (0,0)
        !           164:  0118  8B 16 0000 R                    mov     dx,wid          ;lower right corner of window (wid,lps)
        !           165:  011C  CD 10                           int     10h             ;scroll window up one line      
        !           166:                                
        !           167:  011E  FE 0E 0003 R            updn:   dec     lin             ;leave current line number unchanged
        !           168:  0122  FE 06 0003 R            upda:   inc     lin             ;advance to next line
        !           169:  0126  B4 02                   updc:   mov     ah,2
        !           170:  0128  8A 3E 0005 R                    mov     bh,pag
        !           171:  012C  8B 16 0002 R                    mov     dx,col
        !           172:  0130  CD 10                           int     10h             ;update cursor position
        !           173:                                
        !           174:  0132  33 C0                   pexit:  xor     ax,ax           ;return zero
        !           175:  0134  5D                              pop     bp
        !           176:  0135  CB                              ret
        !           177:  0136                          _lputc  endp
        !           178:                                
        !           179:  0136                          _lputs  proc
        !           180:  0136  55                              push    bp
        !           181: Microsoft (R) Macro Assembler Version 5.10                  3/15/92 16:02:55
        !           182:                                                              Page     1-4
        !           183: 
        !           184: 
        !           185:  0137  8B EC                           mov     bp,sp
        !           186:  0139  06                              push    es
        !           187:  013A  8B 46 08                                mov     ax,[bp+8]       ;string segment
        !           188:  013D  8B 5E 06                                mov     bx,[bp+6]       ;string offset
        !           189:  0140  8E C0                           mov     es,ax
        !           190:  0142  32 F6                           xor     dh,dh
        !           191:  0144  26: 8A 17               nxtch:  mov     dl,es:[bx]      ;character to output
        !           192:  0147  0A D2                           or      dl,dl
        !           193:  0149  74 15                           jz      sexit
        !           194:                                
        !           195:  014B  43                              inc     bx              ;address next character
        !           196:  014C  75 07                           jnz     nowrap
        !           197:  014E  8C C0                           mov     ax,es
        !           198:  0150  05 0100                         add     ax,100h         ;add 64k to segment pointer
        !           199:  0153  8E C0                           mov     es,ax
        !           200:  0155  53                      nowrap: push    bx              ;save offset
        !           201:  0156  52                              push    dx              ;arg 1
        !           202:  0157  9A 0076 ---- R                  call    _lputc          ;put character
        !           203:  015C  5A                              pop     dx
        !           204:  015D  5B                              pop     bx
        !           205:  015E  EB E4                           jmp     nxtch
        !           206:                                
        !           207:  0160  8B 46 06                        sexit:  mov     ax,[bp+6]
        !           208:  0163  8B 56 08                                mov     dx,[bp+8]
        !           209:  0166  07                              pop     es
        !           210:  0167  5D                              pop     bp
        !           211:  0168  CB                              ret
        !           212:  0169                          _lputs  endp
        !           213:                                
        !           214:                                        end
        !           215: Microsoft (R) Macro Assembler Version 5.10                  3/15/92 16:02:55
        !           216:                                                              Symbols-1
        !           217: 
        !           218: 
        !           219: Segments and Groups:
        !           220: 
        !           221:                 N a m e                Length   Align  Combine Class
        !           222: 
        !           223: DGROUP . . . . . . . . . . . . .       GROUP
        !           224:   _DATA  . . . . . . . . . . . .       0006    WORD    PUBLIC  'DATA'
        !           225: LCLIO_TEXT . . . . . . . . . . .       0169    WORD    PUBLIC  'CODE'
        !           226: 
        !           227: Symbols:            
        !           228: 
        !           229:                 N a m e                Type     Value   Attr
        !           230: 
        !           231: ATR  . . . . . . . . . . . . . .       L BYTE  0004    _DATA
        !           232: 
        !           233: CLREOL . . . . . . . . . . . . .       L NEAR  009D    LCLIO_TEXT
        !           234: COL  . . . . . . . . . . . . . .       L BYTE  0002    _DATA
        !           235: CUUPD  . . . . . . . . . . . . .       L NEAR  0027    LCLIO_TEXT
        !           236: 
        !           237: LIN  . . . . . . . . . . . . . .       L BYTE  0003    _DATA
        !           238: LPS  . . . . . . . . . . . . . .       L BYTE  0001    _DATA
        !           239: 
        !           240: MM . . . . . . . . . . . . . . .       TEXT  l         
        !           241: 
        !           242: NONCTL . . . . . . . . . . . . .       L NEAR  00E5    LCLIO_TEXT
        !           243: NOWRAP . . . . . . . . . . . . .       L NEAR  0155    LCLIO_TEXT
        !           244: NXTCH  . . . . . . . . . . . . .       L NEAR  0144    LCLIO_TEXT
        !           245: 
        !           246: OUTBL  . . . . . . . . . . . . .       L NEAR  00C3    LCLIO_TEXT
        !           247: OUTBS  . . . . . . . . . . . . .       L NEAR  00B5    LCLIO_TEXT
        !           248: OUTCS  . . . . . . . . . . . . .       L NEAR  00CF    LCLIO_TEXT
        !           249: OUTLF  . . . . . . . . . . . . .       L NEAR  0103    LCLIO_TEXT
        !           250: 
        !           251: PAG  . . . . . . . . . . . . . .       L BYTE  0005    _DATA
        !           252: PEXIT  . . . . . . . . . . . . .       L NEAR  0132    LCLIO_TEXT
        !           253: 
        !           254: SEXIT  . . . . . . . . . . . . .       L NEAR  0160    LCLIO_TEXT
        !           255: 
        !           256: UPDA . . . . . . . . . . . . . .       L NEAR  0122    LCLIO_TEXT
        !           257: UPDC . . . . . . . . . . . . . .       L NEAR  0126    LCLIO_TEXT
        !           258: UPDN . . . . . . . . . . . . . .       L NEAR  011E    LCLIO_TEXT
        !           259: 
        !           260: WID  . . . . . . . . . . . . . .       L BYTE  0000    _DATA
        !           261: 
        !           262: @CODE  . . . . . . . . . . . . .       TEXT  lclio_TEXT                
        !           263: @CODESIZE  . . . . . . . . . . .       TEXT  1         
        !           264: @CPU . . . . . . . . . . . . . .       TEXT  257               
        !           265: @DATASIZE  . . . . . . . . . . .       TEXT  1         
        !           266: @FILENAME  . . . . . . . . . . .       TEXT  lclio             
        !           267: @VERSION . . . . . . . . . . . .       TEXT  510               
        !           268: _lclatr  . . . . . . . . . . . .       F PROC  0065    LCLIO_TEXT      Global  Length = 0011
        !           269: _lclini  . . . . . . . . . . . .       F PROC  0000    LCLIO_TEXT      Global  Length = 0033
        !           270: _lclwx . . . . . . . . . . . . .       F PROC  0055    LCLIO_TEXT      Global  Length = 0008
        !           271: _lclwy . . . . . . . . . . . . .       F PROC  005D    LCLIO_TEXT      Global  Length = 0008
        !           272: _lclxy . . . . . . . . . . . . .       F PROC  0033    LCLIO_TEXT      Global  Length = 0022
        !           273: _lputc . . . . . . . . . . . . .       F PROC  0076    LCLIO_TEXT      Global  Length = 00C0
        !           274: Microsoft (R) Macro Assembler Version 5.10                  3/15/92 16:02:55
        !           275:                                                              Symbols-2
        !           276: 
        !           277: 
        !           278: _lputs . . . . . . . . . . . . .       F PROC  0136    LCLIO_TEXT      Global  Length = 0033
        !           279: 
        !           280: 
        !           281:     198 Source  Lines
        !           282:     198 Total   Lines
        !           283:      44 Symbols
        !           284: 
        !           285:   47678 + 422269 Bytes symbol space free
        !           286: 
        !           287:       0 Warning Errors
        !           288:       0 Severe  Errors

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.