<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.temlib.org/AtariForumWiki/index.php?action=history&amp;feed=atom&amp;title=CW_PROG5MAC.S</id>
	<title>CW PROG5MAC.S - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.temlib.org/AtariForumWiki/index.php?action=history&amp;feed=atom&amp;title=CW_PROG5MAC.S"/>
	<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=CW_PROG5MAC.S&amp;action=history"/>
	<updated>2026-05-13T18:01:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.2</generator>
	<entry>
		<id>https://www.temlib.org/AtariForumWiki/index.php?title=CW_PROG5MAC.S&amp;diff=11655&amp;oldid=prev</id>
		<title>&gt;Wongck at 12:15, 13 October 2011</title>
		<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=CW_PROG5MAC.S&amp;diff=11655&amp;oldid=prev"/>
		<updated>2011-10-13T12:15:56Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:15, 13 October 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l304&quot;&gt;Line 304:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 304:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Back to [[CW_CHAPTER_5]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Back to [[CW_CHAPTER_5]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Programming&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Assembly Language Workshop&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>&gt;Wongck</name></author>
	</entry>
	<entry>
		<id>https://www.temlib.org/AtariForumWiki/index.php?title=CW_PROG5MAC.S&amp;diff=11654&amp;oldid=prev</id>
		<title>&gt;Silver Surfer: Added category</title>
		<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=CW_PROG5MAC.S&amp;diff=11654&amp;oldid=prev"/>
		<updated>2009-05-02T17:29:33Z</updated>

		<summary type="html">&lt;p&gt;Added category&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:29, 2 May 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l304&quot;&gt;Line 304:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 304:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Back to [[CW_CHAPTER_5]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Back to [[CW_CHAPTER_5]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Programming]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>&gt;Silver Surfer</name></author>
	</entry>
	<entry>
		<id>https://www.temlib.org/AtariForumWiki/index.php?title=CW_PROG5MAC.S&amp;diff=11653&amp;oldid=prev</id>
		<title>&gt;Zorro 2 at 14:07, 24 October 2006</title>
		<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=CW_PROG5MAC.S&amp;diff=11653&amp;oldid=prev"/>
		<updated>2006-10-24T14:07:23Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
;---------------------------------------------------------------------&lt;br /&gt;
; THE ST ASSEMBLY LANGUAGE WORKSHOP, VOLUME 2&lt;br /&gt;
; PROGRAM 5&lt;br /&gt;
;&lt;br /&gt;
; COPYRIGHT 1992 BY CLAYTON WALNUM&lt;br /&gt;
;---------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
CCONIN          equ     1&lt;br /&gt;
PTERM0          equ     0&lt;br /&gt;
MSHRINK         equ     74&lt;br /&gt;
&lt;br /&gt;
V_CLRWK         equ     3&lt;br /&gt;
V_PLINE         equ     6&lt;br /&gt;
VSL_TYPE        equ     15&lt;br /&gt;
VSL_WIDTH       equ     16&lt;br /&gt;
VSL_COLOR       equ     17&lt;br /&gt;
V_OPNVWK        equ     100&lt;br /&gt;
V_CLSVWK        equ     101&lt;br /&gt;
VSL_ENDS        equ     108&lt;br /&gt;
&lt;br /&gt;
AES_OPCODE      equ     200&lt;br /&gt;
VDI_OPCODE      equ     115&lt;br /&gt;
&lt;br /&gt;
;--------------------------------------------------------------------&lt;br /&gt;
; MACROS&lt;br /&gt;
;--------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
;--------------------------------------------------------------------&lt;br /&gt;
; This macro gets a single character from the keyboard, using the&lt;br /&gt;
; Cconin GEMDOS function.&lt;br /&gt;
;--------------------------------------------------------------------&lt;br /&gt;
.macro get_char&lt;br /&gt;
        move    #CCONIN,-(sp)&lt;br /&gt;
        trap    #1&lt;br /&gt;
        addq.l  #2,sp&lt;br /&gt;
        .endm&lt;br /&gt;
        &lt;br /&gt;
;--------------------------------------------------------------------&lt;br /&gt;
; MAIN PROGRAM&lt;br /&gt;
;--------------------------------------------------------------------&lt;br /&gt;
        .text&lt;br /&gt;
&lt;br /&gt;
; Calculate the size of the program area.&lt;br /&gt;
&lt;br /&gt;
        move.l  a7,a5                   ; Save addr of TPA.&lt;br /&gt;
        lea     stack,sp                ; Load addr of our stack.&lt;br /&gt;
        &lt;br /&gt;
        move.l  4(a5),a5                ; Get addr of TPA.              &lt;br /&gt;
        move.l  12(a5),d0               ; Get len of text segment.&lt;br /&gt;
        add.l   20(a5),d0               ; Add len of data segment.&lt;br /&gt;
        add.l   28(a5),d0               ; Add len of BSS segment.&lt;br /&gt;
        add.l   #$100,d0                ; Add len of TPA. &lt;br /&gt;
&lt;br /&gt;
; Release unused memory back to the system.&lt;br /&gt;
        &lt;br /&gt;
        move.l  d0,-(sp)                ; Push size of program on stack.&lt;br /&gt;
        move.l  a5,-(sp)                ; Push program addr on stack.&lt;br /&gt;
        clr     -(sp)                   ; Clear dummy word on stack.    &lt;br /&gt;
        move    #MSHRINK,-(sp)          ; Push Mshrink opcode.&lt;br /&gt;
        trap    #1                      ; Call GEMDOS.&lt;br /&gt;
        add.l   #12,sp                  ; Reset stack pointer.&lt;br /&gt;
&lt;br /&gt;
; Clear some fields of the global array.&lt;br /&gt;
&lt;br /&gt;
        clr.l   ap_ptree        &lt;br /&gt;
        clr.l   ap_1resv&lt;br /&gt;
        clr.l   ap_2resv&lt;br /&gt;
        clr.l   ap_3resv&lt;br /&gt;
        clr.l   ap_4resv&lt;br /&gt;
&lt;br /&gt;
; Call appl_init to initialize application.&lt;br /&gt;
&lt;br /&gt;
        move.l  #appl_init,apb&lt;br /&gt;
        bsr     aes&lt;br /&gt;
        cmpi    #$FFFF,ap_id            ; Error?&lt;br /&gt;
        beq     end                     ; Yep.  Outta here.&lt;br /&gt;
&lt;br /&gt;
; Get handle to screen device.&lt;br /&gt;
&lt;br /&gt;
        move.l  #graf_handle,apb&lt;br /&gt;
        jsr     aes&lt;br /&gt;
        move    int_out,gr_handle       ; Save screen device handle.&lt;br /&gt;
&lt;br /&gt;
; Open virtual workstation.&lt;br /&gt;
&lt;br /&gt;
        move    #V_OPNVWK,contrl        ; v_opnvwk opcode.&lt;br /&gt;
        clr     contrl+2                ; # of points in pts_in.&lt;br /&gt;
        move    #11,contrl+6            ; # of ints in int_in.&lt;br /&gt;
        move    gr_handle,contrl+12     ; Screen device handle. &lt;br /&gt;
        movea.l #int_in,a5              ; Get address of int_in.&lt;br /&gt;
        move    #9,d5                   ; Init loop counter.&lt;br /&gt;
loop:&lt;br /&gt;
        move    #1,(a5)+                ; Place 1 in element of int_in.&lt;br /&gt;
        dbra    d5,loop                 ; Go init next element of int_in.&lt;br /&gt;
        move    #2,int_in+20            ; Set for raster coordinates.&lt;br /&gt;
        jsr     vdi&lt;br /&gt;
        move    contrl+12,vws_handle    ; Save virtual workstation handle.&lt;br /&gt;
&lt;br /&gt;
; Clear workstation.&lt;br /&gt;
&lt;br /&gt;
        move    #V_CLRWK,contrl         ; v_clrwk opcode.&lt;br /&gt;
        clr     contrl+2                ; # of points in pts_in.&lt;br /&gt;
        clr     contrl+6                ; # of ints in int_in.&lt;br /&gt;
        jsr     vdi&lt;br /&gt;
&lt;br /&gt;
        move    #3,d5                   ; Init loop counter.&lt;br /&gt;
polyline:&lt;br /&gt;
&lt;br /&gt;
; Set line color.&lt;br /&gt;
&lt;br /&gt;
        move    #VSL_COLOR,contrl       ; vsl_color opcode.&lt;br /&gt;
        clr     contrl+2                ; # of points in pts_in.&lt;br /&gt;
        move    #1,contrl+6             ; # of ints in int_in.&lt;br /&gt;
        move    color,int_in            ; New line color.&lt;br /&gt;
        jsr     vdi&lt;br /&gt;
        addq    #1,color&lt;br /&gt;
&lt;br /&gt;
; Set line ends.&lt;br /&gt;
&lt;br /&gt;
        move    #VSL_ENDS,contrl        ; vsl_ends opcode.&lt;br /&gt;
        clr     contrl+2                ; # points in pts_in.&lt;br /&gt;
        move    #2,contrl+6             ; # ints in int_in.&lt;br /&gt;
        move    ends,int_in             ; End style for start of line.&lt;br /&gt;
        move    ends,int_in+2           ; End style for end of line.&lt;br /&gt;
        jsr     vdi&lt;br /&gt;
        addq    #1,ends&lt;br /&gt;
&lt;br /&gt;
; Set line width.&lt;br /&gt;
&lt;br /&gt;
        move    #VSL_WIDTH,contrl       ; vsl_width opcode.&lt;br /&gt;
        move    #1,contrl+2             ; # points in pts_in.&lt;br /&gt;
        clr     contrl+6                ; # of ints in int_in.&lt;br /&gt;
        move    width,pts_in            ; New line width.&lt;br /&gt;
        clr     pts_in+2&lt;br /&gt;
        jsr     vdi&lt;br /&gt;
        addq    #2,width                ; calculate next line width.&lt;br /&gt;
&lt;br /&gt;
; Draw polyline.&lt;br /&gt;
&lt;br /&gt;
        move    #V_PLINE,contrl         ; v_pline opcode.&lt;br /&gt;
        move    #2,contrl+2             ; # of points in pts_in.&lt;br /&gt;
        clr     contrl+6                ; # of ints in int_in.&lt;br /&gt;
        move    #30,pts_in              ; X coord of first point.&lt;br /&gt;
        move    y1,pts_in+2             ; Y coord of first point.&lt;br /&gt;
        move    #280,pts_in+4           ; X coord of second point.&lt;br /&gt;
        move    y2,pts_in+6             ; Y coord of second point.&lt;br /&gt;
        jsr     vdi&lt;br /&gt;
        add     #10,y1                  ; Calculate next Y coords.&lt;br /&gt;
        add     #10,y2&lt;br /&gt;
        dbra    d5,polyline             ; Go draw next line.&lt;br /&gt;
&lt;br /&gt;
; Reset line widths.&lt;br /&gt;
&lt;br /&gt;
        move    #VSL_WIDTH,contrl       ; vsl_width opcode.&lt;br /&gt;
        move    #1,contrl+2             ; # of points in pts_in.&lt;br /&gt;
        clr     contrl+6                ; # of ints in int_in.&lt;br /&gt;
        move    #1,pts_in               ; New line width.&lt;br /&gt;
        clr     pts_in+2&lt;br /&gt;
        jsr     vdi&lt;br /&gt;
&lt;br /&gt;
; Reset line ends.&lt;br /&gt;
&lt;br /&gt;
        move    #VSL_ENDS,contrl        ; vsl_ends opcode.&lt;br /&gt;
        clr     contrl+2                ; # of points in pts_in.&lt;br /&gt;
        move    #2,contrl+6             ; # of ints in int_in.&lt;br /&gt;
        move    #0,int_in               ; End style for start of line.&lt;br /&gt;
        move    #0,int_in+2             ; End style for end of line.&lt;br /&gt;
        jsr     vdi&lt;br /&gt;
&lt;br /&gt;
        move    #5,d5                   ; Init loop counter.&lt;br /&gt;
polyline2:&lt;br /&gt;
&lt;br /&gt;
; Set line type.&lt;br /&gt;
&lt;br /&gt;
        move    #VSL_TYPE,contrl        ; vsl_type opcode.&lt;br /&gt;
        clr     contrl+2                ; # of points in pts_in.&lt;br /&gt;
        move    #1,contrl+6             ; # of ints in int_in.&lt;br /&gt;
        move    type,int_in             ; Line pattern type.&lt;br /&gt;
        jsr     vdi&lt;br /&gt;
        addq    #1,type                 ; Calculate next line type.&lt;br /&gt;
&lt;br /&gt;
; Draw polyline.&lt;br /&gt;
&lt;br /&gt;
        move    #V_PLINE,contrl         ; v_pline opcode.&lt;br /&gt;
        move    #2,contrl+2             ; # of points in pts_in.&lt;br /&gt;
        clr     contrl+6                ; # of ints in int_in.&lt;br /&gt;
        move    #30,pts_in              ; X coord of first point.&lt;br /&gt;
        move    y1,pts_in+2             ; Y coord of first point.&lt;br /&gt;
        move    #280,pts_in+4           ; X coord of second point.&lt;br /&gt;
        move    y2,pts_in+6             ; Y coord of second point.&lt;br /&gt;
        jsr     vdi&lt;br /&gt;
        add     #10,y1                  ; Calculate next Y coords.&lt;br /&gt;
        add     #10,y2&lt;br /&gt;
        dbra    d5,polyline2            ; Go draw another line.&lt;br /&gt;
&lt;br /&gt;
        get_char        &lt;br /&gt;
&lt;br /&gt;
; Close the virtual workstation.&lt;br /&gt;
&lt;br /&gt;
        move    #V_CLSVWK,contrl        ; v_clsvwk opcode.&lt;br /&gt;
        clr     contrl+2                ; # of points in pts_in.&lt;br /&gt;
        clr     contrl+6                ; # of ints in int_in.&lt;br /&gt;
        jsr     vdi&lt;br /&gt;
                &lt;br /&gt;
; Close down application.&lt;br /&gt;
&lt;br /&gt;
exit:&lt;br /&gt;
        move.l  #appl_exit,apb          ; appl_exit control array.&lt;br /&gt;
        bsr     aes&lt;br /&gt;
        &lt;br /&gt;
end:&lt;br /&gt;
        move.w  #PTERM0,-(sp)           ; Back to desktop.&lt;br /&gt;
        trap    #1&lt;br /&gt;
&lt;br /&gt;
;--------------------------------------------------------------------&lt;br /&gt;
; This subroutine calls the AES.  Before calling this subroutine, the&lt;br /&gt;
; program must have correctly initialized the AES control, int_in,&lt;br /&gt;
; and addr_in arrays.&lt;br /&gt;
;&lt;br /&gt;
; Input:        Appropriate values in the int_in, addr_in, and&lt;br /&gt;
;               control arrays.&lt;br /&gt;
; Output:       Appropriate values in the int_out, addr_out, and&lt;br /&gt;
;               global arrays.&lt;br /&gt;
; Regs changed: NONE&lt;br /&gt;
; Uses: apb, global, int_in, int_out, addr_in, addr_out&lt;br /&gt;
;--------------------------------------------------------------------&lt;br /&gt;
aes:&lt;br /&gt;
        movem.l a0-a7/d0-d7,-(sp)       ; Save registers.&lt;br /&gt;
        move.l  #apb,d1                 ; Load addr of apb.&lt;br /&gt;
        move.w  #AES_OPCODE,d0          ; Load AES opcode.&lt;br /&gt;
        trap    #2                      ; Call AES.&lt;br /&gt;
        movem.l (sp)+,a0-a7/d0-d7       ; Restore registers.&lt;br /&gt;
        rts&lt;br /&gt;
&lt;br /&gt;
;--------------------------------------------------------------------&lt;br /&gt;
; This subroutine calls the VDI. Before calling this subroutine, the&lt;br /&gt;
; program must have correctly initialized the VDI contrl, intin,&lt;br /&gt;
; and ptsin arrays.&lt;br /&gt;
;&lt;br /&gt;
; Input:        Appropriate values in the intin, ptsin, and&lt;br /&gt;
;               contrl arrays.&lt;br /&gt;
; Output:       Appropriate values in the intout and ptsout arrays.&lt;br /&gt;
; Regs changed: NONE&lt;br /&gt;
; Uses: vpb, intin, intout, ptsin, ptsout&lt;br /&gt;
;--------------------------------------------------------------------&lt;br /&gt;
vdi:&lt;br /&gt;
        movem.l a0-a7/d0-d7,-(sp)       ; Save registers.&lt;br /&gt;
        move.l  #vpb,d1                 ; Load addr of vpb.&lt;br /&gt;
        move.w  #VDI_OPCODE,d0          ; Load VDI opcode.&lt;br /&gt;
        trap    #2                      ; Call VDI.&lt;br /&gt;
        movem.l (sp)+,a0-a7/d0-d7       ; Restore registers.&lt;br /&gt;
        rts&lt;br /&gt;
&lt;br /&gt;
        data&lt;br /&gt;
        &lt;br /&gt;
        even&lt;br /&gt;
&lt;br /&gt;
y1:             dc.w    20&lt;br /&gt;
y2:             dc.w    20&lt;br /&gt;
color:          dc.w    1&lt;br /&gt;
type:           dc.w    1&lt;br /&gt;
width:          dc.w    1&lt;br /&gt;
ends:           dc.w    0&lt;br /&gt;
&lt;br /&gt;
apb:            dc.l    0,global,int_in,int_out,addr_in,addr_out&lt;br /&gt;
vpb:            dc.l    contrl,int_in,pts_in,int_out,pts_out&lt;br /&gt;
&lt;br /&gt;
appl_init:      dc.w    10,0,1,0,0&lt;br /&gt;
appl_exit:      dc.w    19,0,1,0,0&lt;br /&gt;
graf_handle:    dc.w    77,0,5,0,0&lt;br /&gt;
&lt;br /&gt;
        .bss&lt;br /&gt;
&lt;br /&gt;
        .even&lt;br /&gt;
&lt;br /&gt;
gr_handle:      ds.w    1&lt;br /&gt;
vws_handle:     ds.w    1&lt;br /&gt;
        &lt;br /&gt;
global:&lt;br /&gt;
ap_version:     ds.w    1&lt;br /&gt;
ap_count:       ds.w    1&lt;br /&gt;
ap_id:          ds.w    1&lt;br /&gt;
ap_private:     ds.l    1&lt;br /&gt;
ap_ptree:       ds.l    1&lt;br /&gt;
ap_1resv:       ds.l    1&lt;br /&gt;
ap_2resv:       ds.l    1&lt;br /&gt;
ap_3resv:       ds.l    1&lt;br /&gt;
ap_4resv:       ds.l    1&lt;br /&gt;
&lt;br /&gt;
contrl:         ds.w    12&lt;br /&gt;
int_in:         ds.w    128&lt;br /&gt;
int_out:        ds.w    128&lt;br /&gt;
addr_in:        ds.l    64&lt;br /&gt;
addr_out:       ds.l    64&lt;br /&gt;
pts_in:         ds.w    128&lt;br /&gt;
pts_out:        ds.w    128&lt;br /&gt;
&lt;br /&gt;
                ds.l    255&lt;br /&gt;
stack:          ds.l    1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back to [[CW_CHAPTER_5]]&lt;/div&gt;</summary>
		<author><name>&gt;Zorro 2</name></author>
	</entry>
</feed>