📄 llcgrp.asm
字号:
;
; NOTE: b$UpC is a variable through which the routine is
; indirectly called.
;
;Entry:
; None
;
;Exit:
; Graphics Cursor location updated.
;
;Uses:
; Per convention
;
;Exceptions:
; None.
;******************************************************************************
;Our Exit Condition:
; b$OffC, b$MaskC updated
;***
; b$ChkDownC - Move Graphics Cursor down a pixel, checking for bottom edge
;OEM-interface routine
;
;Purpose:
; This routine will move the graphics cursor down one pixel if
; it would stay within the viewport boundaries. If this move
; would make it leave the viewport, then PWS.C is set upon return
; and no move is made. The viewport boundaries are specified by
; a previous call to B$MapVWC. Note that there does not have
; to be a separate check for screen boundaries, as the viewport
; defaults to the screen boundary.
;
; NOTE: b$ChkDownC is a variable through which the routine is
; indirectly called.
;
;Entry:
; None.
;
;Exit:
; PSW.C = set if original cursor was on screen edge.
; PSW.C = reset otherwise, Graphics Cursor moved
;
;Uses:
; Per convention
;
;Exceptions:
; None.
;******************************************************************************
;Our Exit Condition:
; b$OffC, b$MaskC updated if not originally on boundary.
;***
; b$DownC - Move graphics cursor down a pixel
;OEM-interface routine
;
;Purpose:
; Move graphics cursor down 1 pixel. No test is made for
; screen boundaries.
;
; NOTE: b$DownC is a variable through which the routine is
; indirectly called.
;
;Entry:
; None.
;
;Exit:
; Graphics Cursor location updated.
;
;Uses:
; Per convention
;
;Exceptions:
; None.
;******************************************************************************
;Our Exit Condition:
; b$OffC, b$MaskC updated
;***
; b$SetAttr - Set attribute value
;OEM-interface routine
;
;Purpose:
; Map the supplied attribute value to that required for use by
; the mode-dependent module. If the value is legal, then update
; the OEM state to indicate the new attribute to use. Otherwise,
; return with PSW.C set to indicate an error.
;
; NOTE: b$SetAttr is a variable through which the routine is
; indirectly called.
;
;Entry:
; [AL] = attribute
;
;Exit:
; PSW.C = set indicates an error with the attribute value.
;
;Uses:
; Per Convention
;
;Preserves:
; AX
;
;Exceptions:
; None
;******************************************************************************
;***
; b$SetColor
;
;Purpose:
; Process the COLOR statement. Because different modes have different
; reactions to the color statement parameters, they use the parameters
; directly according to their mode-specific functions.
;
; NOTE: b$SetColor is a variable through which the routine is
; indirectly called.
;
;Entry:
; [SI] = address of the parameter list
; [CX] = count of words in parameter list
; (get parameters using B$GetParm)
;
;Exit:
; PSW.C = set indicates that an error was encountered
;
;Uses:
;Exceptions:
;******************************************************************************
;***
; b$ReadC - Return attribute of current pixel
;OEM-interface routine
;
;Purpose:
; Return the attribute of the current pixel as specified by
; by the location of the graphics cursor. This routine is
; used by the BASIC function POINT(). The attribute that is
; is returned should be in the form as it would be passed to
; [b$SetAttr], not in an internal form.
;
; NOTE: b$ReadC is a variable through which the routine is
; indirectly called.
;
;Entry:
; None
;
;Exit:
; [AL] = attribute of pixel
;
;Uses:
; Per Convention
;
;Exceptions:
; None
;******************************************************************************
;***
;b$SetC - Set pixel under graphics cursor to current attribute
;OEM-interface routine
;
;Purpose:
; Set the pixel defined by the current graphics cursor to
; the current attribute.
;
; NOTE: b$SetC is a variable through which the routine is
; indirectly called.
;
;Entry:
; None
;
;Exit:
; None
;
;Uses:
; Per Convention
;
;Exceptions:
; None
;******************************************************************************
;***
; b$SetPixC - Set pixel under graphics cursor to current attribute (fast)
;OEM-interface routine
;
;Purpose:
; Set the pixel defined by the current graphics cursor to
; the current attribute. This is identical to b$SetC with the
; initialization and termination code extracted to make it
; faster when multiple pixels are being set in a graphics
; function (i.e. CIRCLE). A call to b$SetPixFirstC should proceed
; the first call to b$SetPixC. A call to b$SetPixLastC should follow
; the last. b$SetPixFirstC sets up ES which should be preserved for
; all b$SetPixC calls.
;
; NOTE: b$SetPixC is a variable through which the routine is
; indirectly called.
;
;Entry:
; [ES] = the current video segment (set up by b$SetPixFirstC)
;
;Exit:
; None
;
;Uses:
; Per convention
;
;Exceptions:
; None.
;******************************************************************************
;***
; b$SetPixFirstC - Initialize for b$SetPixC
;OEM-interface routine
;
;Purpose:
; Set up ES to the video segment and perform any other mode-dependent
; functions required to optimize setting a number of pixels. A call
; to b$SetPixFirstC should proceed the first call to b$SetPixC.
;
; NOTE: b$SetPixFirstC is a variable through which the routine is
; indirectly called.
;
;Entry:
; None.
;
;Exit:
; [ES] = video segment
;
;Uses:
; ES is modified to point to the video segment
;
;Exceptions:
; None.
;******************************************************************************
;***
; b$SetPixLastC - Termination for b$SetPixC
;OEM-interface routine
;
;Purpose:
; Perform any mode-dependent functions required after setting a number
; of pixels. A call to b$SetPixLastC should follow the last call
; to b$SetPixC.
;
; NOTE: b$SetPixLastC is a variable through which the routine is
; indirectly called.
;
;Entry:
; None.
;
;Exit:
; None.
;
;Uses:
; Per Convention
;
;Exceptions:
; None.
;******************************************************************************
;***
; b$LineX
;
;Purpose:
; Draw an X-major line.
;
; NOTE: b$LineX is a variable through which the routine is
; indirectly called.
;
;Entry:
; AH = color (__AttrC)
; AL = bit accumulator (0)
; CX = point count
; BH = bit mask
; DX = BP change for Y movement (b$IncrY)
; SI = delta decision value
; DI = line style
; BP = video offset
; ES = video segment
; Incr1 = major axis delta update value
; Incr2 = minor axis delta update value
; IncrY = BP change for Y movement
;
;Exit:
;Uses:
;Exceptions:
;******************************************************************************
;***
; b$LineY
;
;Purpose:
; Draw a Y-major line.
;
; NOTE: b$LineY is a variable through which the routine is
; indirectly called.
;
;Entry:
; AH = color (__AttrC)
; CX = point count
; AL = bit mask
; DX = BP change for Y movement (b$IncrY)
; SI = delta decision value
; DI = line style
; BP = video offset
; ES = video segment
; Incr1 = major axis delta update value
; Incr2 = minor axis delta update value
; IncrY = BP change for Y movement
;
;Exit:
;Uses:
;Exceptions:
;******************************************************************************
;***
; b$LineV
;
;Purpose:
; Draw a vertical line.
;
; NOTE: b$LineV is a variable through which the routine is
; indirectly called.
;
;Entry:
; AH = color (__AttrC)
; CX = point count
; AL = bit mask
; DX = BP change for Y movement (b$IncrY)
; DI = line style
; BP = video offset
; ES = video segment
; IncrY = BP change for Y movement
;
;Exit:
;Uses:
; any
;Exceptions:
;******************************************************************************
;***
; b$PutAction
;
;Purpose:
; Allow the mode-dependent module to established which PUT action
; to apply for the next call to b$NWriteL.
;
; NOTE: b$PutAction is a variable through which the routine is
; indirectly called.
;
;Entry:
; AL = PUT action [0..4] represent (OR,AND,PRESET,PSET,XOR)
;
;Exit:
;Uses:
; per convention
;
;Exceptions:
;******************************************************************************
;***
; b$NReadL
;
;Purpose:
; Read a line of pixels from a specified plane to an array.
;
; NOTE: b$NReadL is a variable through which the routine is
; indirectly called.
;
;Entry:
; ES:DI = screen address
; DS:SI = array address
; CX = array align shift count
; BP = count of bits (not pixels) to read
; BH = plane to read from
;
;Exit:
; DS:SI = updated to array byte past point filled
;
;Uses:
;Exceptions:
;******************************************************************************
;***
; b$NWriteL
;
;Purpose:
; Write a line of pixels from an array to a specified plane.
;
; NOTE: b$WriteL is a variable through which the routine is
; indirectly called.
;
;Entry:
; ES:DI = screen address
; DS:SI = array address
; CX = array align shift count
; BP = count of bits (not pixels) to write
; BH = plane to write to
; DL = last partial byte mask
; DH = first partial byte mask
;
;Exit:
; DS:SI = updated to array byte past point used
;
;Uses:
;Exceptions:
;******************************************************************************
;***
; b$NSetC - Set horizontal line of pixels
;OEM-interface routine
;
;Purpose:
; Set a horizontal line of pixels to the current attribute.
; The line starts at the current cursor position and moves right.
; This routine need not check for the end of the screen.
;
;
; NOTE: b$NSetC is a variable through which the routine is
; indirectly called.
;
;Entry:
; [BX] = number of pixels to set
;
;Exit:
; None
;
;Uses:
; Per convention
;
;Exceptions:
; None
;******************************************************************************
;***
; b$PaintBound - Setup for a scan line of PAINT
;OEM-interface routine
;
;Purpose:
; Called by PAINT before painting each scan line, to
; facilitate fast viewport edge detection. This routine will
; normally set VIEW left and right cursor addresses and masks.
;
; The VIEW statement is handled primarily in the OEM independent
; code but in the interest of speed, it is up to the OEM dependent
; code to check for the edges of the viewport during painting.
; The OEM is passed the pixel coordinates of the viewport in
; a call to B$MapVWC, however converting from this form to
; the internal representation may be too slow to do repeatedly.
; Thus, for each row of a region that is going to be painted
; [b$PaintBound] is called. This routine should set up conditions
; so that [b$ChkDownC], [b$ChkUpc], [b$ScanR], and [b$ScanL]
; can do fast tests for detecting the edges of the viewport.
;
; The calculations done by b$PaintBound are entirely up to the
; OEM. Note however, that the part of the screen that can be
; changed by graphics statements after a VIEW statement includes
; the "edges" that the user specified. Thus VIEW(10,10)-(11,11)
; has for pixels that can be changed by graphics statements.
;
; NOTE: b$PaintBound is a variable through which the routine is
; indirectly called.
;
;Entry:
; Graphics Cursor is positioned on line to be painted
;
;Exit:
; Viewport left edge address of current row computed.
; Viewport right edge address of current row computed.
; Possible OEM state variables updated.
;
;Uses:
; Per convention
;
;Exceptions:
; None
;******************************************************************************
;Our Entry Condition:
; b$OffC = address of current pixel
;
;Our Exit Condition:
; B$LEOFST = left edge offset
; B$REOFST = right edge offset
;
;***
; b$SetTile - Set tile attribute
;OEM-interface routine
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -