'=========================================================================== ' Subject: 3D-DOT MORPHING Date: 06-05-97 (15:20) ' Author: Daniel Davies Code: QB, QBasic, PDS ' Origin: ia53@rapid.co.uk Packet: GRAPHICS.ABC '=========================================================================== '3D-DOT MORPHING 'By Hang-Fire 'This has two objects, they can take have any number of points, just so long 'as they have the same number of points each, in this case there are 342 'points per object, it starts off with a sphere, and then morphs it into a 'chalice like object, while it is doing this it spins the object round along 'two of its axis's. to keep the animation smooth, and to stop it flickering 'it uses a 64kb array to simulate a hidden page, it then uses a fast assembly 'routine to copy this page onto the screen, which is using screen mode 13h. 'My web site is at HTTP://www.users.rapid.net.uk/ia53 and has a load of my 'other programs on it. 'My e-mail address is ia53@rapid.co.uk 'if you want to use any part of this program then you can, but please give me 'some credit. 'I don't know who the assembly routines are by, so don't credit me with them. DECLARE SUB memcopy (fromseg%, fromoffset%, toseg%, tooffset%, bytes%) DECLARE SUB FillChar (segment%, offset%, value%, bytes%) DIM SHARED buffer(319, 199) AS STRING * 1 TYPE ivector x AS INTEGER y AS INTEGER z AS INTEGER END TYPE TYPE dvector x AS SINGLE y AS SINGLE z AS SINGLE xm AS SINGLE ym AS SINGLE zm AS SINGLE END TYPE DIM eobj(342) AS ivector DIM tobj(342) AS dvector DIM sine(360) AS SINGLE FOR x& = 0 TO 360 sine(x&) = SIN(x& * (3.141592654# / 180)) NEXT x& RESTORE glassdata: FOR x& = 1 TO 342 READ eobj(x&).x READ eobj(x&).y READ eobj(x&).z NEXT x& RESTORE spheredata: frames& = 100 FOR x& = 1 TO 342 READ x%, y%, z% tobj(x&).x = x%: tobj(x&).y = y%: tobj(x&).z = z% tobj(x&).xm = (eobj(x&).x - x%) / frames& tobj(x&).ym = (eobj(x&).y - y%) / frames& tobj(x&).zm = (eobj(x&).z - z%) / frames& NEXT x& SCREEN 13 OUT &H3C8, 0 FOR x% = 0 TO 106 OUT &H3C9, INT(x% / 1.666666666666666#) OUT &H3C9, INT(x% / 1.666666666666666#) OUT &H3C9, INT(x% / 1.666666666666666#) NEXT x% DO FOR t1& = 1 TO frames& t& = (720 / frames&) * t1& FOR x& = 1 TO 342 x3& = tobj(x&).x y3& = tobj(x&).y z3& = tobj(x&).z y2& = (y3& * sine((t& + 270) MOD 360)) - (z3& * sine(t& MOD 360)) z2& = (y3& * sine(t& MOD 360)) + (z3& * sine((t& + 270) MOD 360)) x2& = (x3& * sine((t& + 270) MOD 360)) - (z2& * sine(t& MOD 360)) z1& = (x3& * sine(t& MOD 360)) + (z2& * sine((t& + 270) MOD 360)) y1& = y2& x1& = x2& IF z1& <> 0 THEN px% = ((x1& * 255) / (z1& + 255)) + 160 py% = ((y1& * 255) / (z1& + 255)) + 101 buffer(px%, py%) = CHR$(z1& + 60) ELSE buffer(((x1& * 255) / 255) + 160, ((y1& * 255) / 255) + 100) = CHR$(z1& + 60) END IF NEXT x& FOR x& = 1 TO 342 tobj(x&).x = tobj(x&).x + tobj(x&).xm tobj(x&).y = tobj(x&).y + tobj(x&).ym tobj(x&).z = tobj(x&).z + tobj(x&).zm NEXT x& memcopy VARSEG(buffer(0, 0)), VARPTR(buffer(0, 0)), &HA000, 0, &HFA00 FillChar VARSEG(buffer(0, 0)), VARPTR(buffer(0, 0)), 0, &HFA00 IF INKEY$ <> "" THEN GOTO exitp: NEXT t1& FOR t1& = 1 TO frames& t& = (720 / frames&) * t1& FOR x& = 1 TO 342 x3& = tobj(x&).x y3& = tobj(x&).y z3& = tobj(x&).z y2& = (y3& * sine((t& + 270) MOD 360)) - (z3& * sine(t& MOD 360)) z2& = (y3& * sine(t& MOD 360)) + (z3& * sine((t& + 270) MOD 360)) x2& = (x3& * sine((t& + 270) MOD 360)) - (z2& * sine(t& MOD 360)) z1& = (x3& * sine(t& MOD 360)) + (z2& * sine((t& + 270) MOD 360)) y1& = y2& x1& = x2& IF z1& <> 0 THEN px% = ((x1& * 255) / (z1& + 255)) + 160 py% = ((y1& * 255) / (z1& + 255)) + 101 buffer(px%, py%) = CHR$(z1& + 60) ELSE buffer(((x1& * 255) / 255) + 160, ((y1& * 255) / 255) + 100) = CHR$(z1& + 60) END IF NEXT x& memcopy VARSEG(buffer(0, 0)), VARPTR(buffer(0, 0)), &HA000, 0, &HFA00 FillChar VARSEG(buffer(0, 0)), VARPTR(buffer(0, 0)), 0, &HFA00 IF INKEY$ <> "" THEN GOTO exitp: NEXT t1& FOR t1& = 1 TO frames& t& = (720 / frames&) * t1& FOR x& = 1 TO 342 x3& = tobj(x&).x y3& = tobj(x&).y z3& = tobj(x&).z y2& = (y3& * sine((t& + 270) MOD 360)) - (z3& * sine(t& MOD 360)) z2& = (y3& * sine(t& MOD 360)) + (z3& * sine((t& + 270) MOD 360)) x2& = (x3& * sine((t& + 270) MOD 360)) - (z2& * sine(t& MOD 360)) z1& = (x3& * sine(t& MOD 360)) + (z2& * sine((t& + 270) MOD 360)) y1& = y2& x1& = x2& IF z1& <> 0 THEN px% = ((x1& * 255) / (z1& + 255)) + 160 py% = ((y1& * 255) / (z1& + 255)) + 101 buffer(px%, py%) = CHR$(z1& + 60) ELSE buffer(((x1& * 255) / 255) + 160, ((y1& * 255) / 255) + 100) = CHR$(z1& + 60) END IF NEXT x& FOR x& = 1 TO 342 tobj(x&).x = tobj(x&).x - tobj(x&).xm tobj(x&).y = tobj(x&).y - tobj(x&).ym tobj(x&).z = tobj(x&).z - tobj(x&).zm NEXT x& memcopy VARSEG(buffer(0, 0)), VARPTR(buffer(0, 0)), &HA000, 0, &HFA00 FillChar VARSEG(buffer(0, 0)), VARPTR(buffer(0, 0)), 0, &HFA00 IF INKEY$ <> "" THEN GOTO exitp: NEXT t1& LOOP exitp: CLEAR SCREEN 0 WIDTH 80 END spheredata: DATA 0,40,0 DATA 0,40,0 DATA 0,40,0 DATA 0,40,0 DATA 0,40,0 DATA 0,40,0 DATA 0,40,0 DATA 0,40,0 DATA 0,40,0 DATA 0,40,0 DATA 0,40,0 DATA 0,40,0 DATA 0,40,0 DATA 0,40,0 DATA 0,40,0 DATA 0,40,0 DATA 0,40,0 DATA 0,40,0 DATA 0,40,0 DATA 0,39,7 DATA 2,39,7 DATA 4,39,5 DATA 6,39,3 DATA 7,39,1 DATA 7,39,-1 DATA 6,39,-4 DATA 4,39,-5 DATA 2,39,-7 DATA 0,39,-7 DATA -2,39,-7 DATA -4,39,-5 DATA -6,39,-3 DATA -7,39,-1 DATA -7,39,1 DATA -6,39,4 DATA -4,39,5 DATA -2,39,7 DATA 0,39,7 DATA 0,38,14 DATA 5,38,13 DATA 9,38,11 DATA 12,38,7 DATA 14,38,2 DATA 14,38,-2 DATA 12,38,-7 DATA 9,38,-11 DATA 5,38,-13 DATA 0,38,-14 DATA -5,38,-13 DATA -9,38,-11 DATA -12,38,-7 DATA -14,38,-2 DATA -14,38,2 DATA -12,38,7 DATA -9,38,11 DATA -5,38,13 DATA 0,38,14 DATA 0,35,20 DATA 7,35,19 DATA 13,35,15 DATA 17,35,10 DATA 20,35,3 DATA 20,35,-3 DATA 17,35,-10 DATA 13,35,-15 DATA 7,35,-19 DATA 0,35,-20 DATA -7,35,-19 DATA -13,35,-15 DATA -17,35,-10 DATA -20,35,-3 DATA -20,35,3 DATA -17,35,10 DATA -13,35,15 DATA -7,35,19 DATA 0,35,20 DATA 0,31,26 DATA 9,31,24 DATA 17,31,20 DATA 23,31,13 DATA 26,31,5 DATA 26,31,-5 DATA 23,31,-13 DATA 17,31,-20 DATA 9,31,-24 DATA 0,31,-26 DATA -9,31,-24 DATA -17,31,-20 DATA -23,31,-13 DATA -26,31,-5 DATA -26,31,5 DATA -23,31,13 DATA -17,31,20 DATA -9,31,24 DATA 0,31,26 DATA 0,26,31 DATA 11,26,29 DATA 20,26,24 DATA 27,26,15 DATA 31,26,5 DATA 31,26,-5 DATA 27,26,-16 DATA 20,26,-24 DATA 11,26,-29 DATA 0,26,-31 DATA -11,26,-29 DATA -20,26,-24 DATA -27,26,-15 DATA -31,26,-5 DATA -31,26,5 DATA -27,26,16 DATA -20,26,24 DATA -11,26,29 DATA 0,26,31 DATA 0,20,35 DATA 12,20,33 DATA 22,20,27 DATA 30,20,17 DATA 34,20,6 DATA 34,20,-6 DATA 30,20,-18 DATA 22,20,-27 DATA 12,20,-33 DATA 0,20,-35 DATA -12,20,-33 DATA -22,20,-27 DATA -30,20,-17 DATA -34,20,-6 DATA -34,20,6 DATA -30,20,18 DATA -22,20,27 DATA -12,20,33 DATA 0,20,35 DATA 0,14,38 DATA 13,14,36 DATA 24,14,29 DATA 33,14,19 DATA 37,14,7 DATA 37,14,-7 DATA 33,14,-19 DATA 24,14,-29 DATA 13,14,-36 DATA 0,14,-38 DATA -13,14,-36 DATA -24,14,-29 DATA -33,14,-19 DATA -37,14,-7 DATA -37,14,7 DATA -33,14,19 DATA -24,14,29 DATA -13,14,36 DATA 0,14,38 DATA 0,7,39 DATA 13,7,37 DATA 25,7,30 DATA 34,7,19 DATA 38,7,7 DATA 38,7,-7 DATA 34,7,-20 DATA 25,7,-30 DATA 13,7,-37 DATA 0,7,-39 DATA -13,7,-37 DATA -25,7,-30 DATA -34,7,-19 DATA -38,7,-7 DATA -38,7,7 DATA -34,7,20 DATA -25,7,30 DATA -13,7,37 DATA 0,7,39 DATA 0,0,40 DATA 14,0,38 DATA 26,0,31 DATA 35,0,20 DATA 39,0,7 DATA 39,0,-7 DATA 35,0,-20 DATA 26,0,-31 DATA 14,0,-38 DATA 0,0,-40 DATA -14,0,-38 DATA -26,0,-31 DATA -35,0,-20 DATA -39,0,-7 DATA -39,0,7 DATA -35,0,20 DATA -26,0,31 DATA -14,0,38 DATA 0,0,40 DATA 0,-7,39 DATA 13,-7,37 DATA 25,-7,30 DATA 34,-7,19 DATA 38,-7,7 DATA 38,-7,-7 DATA 34,-7,-20 DATA 25,-7,-30 DATA 13,-7,-37 DATA 0,-7,-39 DATA -13,-7,-37 DATA -25,-7,-30 DATA -34,-7,-19 DATA -38,-7,-7 DATA -38,-7,7 DATA -34,-7,20 DATA -25,-7,30 DATA -13,-7,37 DATA 0,-7,39 DATA 0,-14,38 DATA 13,-14,36 DATA 24,-14,29 DATA 33,-14,19 DATA 37,-14,7 DATA 37,-14,-7 DATA 33,-14,-19 DATA 24,-14,-29 DATA 13,-14,-36 DATA 0,-14,-38 DATA -13,-14,-36 DATA -24,-14,-29 DATA -33,-14,-19 DATA -37,-14,-7 DATA -37,-14,7 DATA -33,-14,19 DATA -24,-14,29 DATA -13,-14,36 DATA 0,-14,38 DATA 0,-20,35 DATA 12,-20,33 DATA 22,-20,27 DATA 30,-20,17 DATA 34,-20,6 DATA 34,-20,-6 DATA 30,-20,-18 DATA 22,-20,-27 DATA 12,-20,-33 DATA 0,-20,-35 DATA -12,-20,-33 DATA -22,-20,-27 DATA -30,-20,-17 DATA -34,-20,-6 DATA -34,-20,6 DATA -30,-20,18 DATA -22,-20,27 DATA -12,-20,33 DATA 0,-20,35 DATA 0,-26,31 DATA 11,-26,29 DATA 20,-26,24 DATA 27,-26,15 DATA 31,-26,5 DATA 31,-26,-5 DATA 27,-26,-16 DATA 20,-26,-24 DATA 11,-26,-29 DATA 0,-26,-31 DATA -11,-26,-29 DATA -20,-26,-24 DATA -27,-26,-15 DATA -31,-26,-5 DATA -31,-26,5 DATA -27,-26,16 DATA -20,-26,24 DATA -11,-26,29 DATA 0,-26,31 DATA 0,-31,26 DATA 9,-31,24 DATA 17,-31,20 DATA 23,-31,13 DATA 26,-31,5 DATA 26,-31,-5 DATA 23,-31,-13 DATA 17,-31,-20 DATA 9,-31,-24 DATA 0,-31,-26 DATA -9,-31,-24 DATA -17,-31,-20 DATA -23,-31,-13 DATA -26,-31,-5 DATA -26,-31,5 DATA -23,-31,13 DATA -17,-31,20 DATA -9,-31,24 DATA 0,-31,26 DATA 0,-35,20 DATA 7,-35,19 DATA 13,-35,15 DATA 17,-35,10 DATA 20,-35,3 DATA 20,-35,-3 DATA 17,-35,-10 DATA 13,-35,-15 DATA 7,-35,-19 DATA 0,-35,-20 DATA -7,-35,-19 DATA -13,-35,-15 DATA -17,-35,-10 DATA -20,-35,-3 DATA -20,-35,3 DATA -17,-35,10 DATA -13,-35,15 DATA -7,-35,19 DATA 0,-35,20 DATA 0,-38,14 DATA 5,-38,13 DATA 9,-38,11 DATA 12,-38,7 DATA 14,-38,2 DATA 14,-38,-2 DATA 12,-38,-7 DATA 9,-38,-11 DATA 5,-38,-13 DATA 0,-38,-14 DATA -5,-38,-13 DATA -9,-38,-11 DATA -12,-38,-7 DATA -14,-38,-2 DATA -14,-38,2 DATA -12,-38,7 DATA -9,-38,11 DATA -5,-38,13 DATA 0,-38,14 DATA 0,-39,7 DATA 2,-39,7 DATA 4,-39,5 DATA 6,-39,3 DATA 7,-39,1 DATA 7,-39,-1 DATA 6,-39,-4 DATA 4,-39,-5 DATA 2,-39,-7 DATA 0,-39,-7 DATA -2,-39,-7 DATA -4,-39,-5 DATA -6,-39,-3 DATA -7,-39,-1 DATA -7,-39,1 DATA -6,-39,4 DATA -4,-39,5 DATA -2,-39,7 DATA 0,-39,7 glassdata: DATA 10,-40,30 DATA 19,-40,26 DATA 26,-40,19 DATA 30,-40,10 DATA 32,-40,0 DATA 30,-40,-10 DATA 26,-40,-19 DATA 19,-40,-26 DATA 10,-40,-30 DATA 0,-40,-32 DATA -10,-40,-30 DATA -19,-40,-26 DATA -26,-40,-19 DATA -30,-40,-10 DATA -32,-40,0 DATA -30,-40,10 DATA -26,-40,19 DATA -19,-40,26 DATA -10,-40,30 DATA 10,-35,30 DATA 19,-35,26 DATA 26,-35,19 DATA 30,-35,10 DATA 32,-35,0 DATA 30,-35,-10 DATA 26,-35,-19 DATA 19,-35,-26 DATA 10,-35,-30 DATA 0,-35,-32 DATA -10,-35,-30 DATA -19,-35,-26 DATA -26,-35,-19 DATA -30,-35,-10 DATA -32,-35,0 DATA -30,-35,10 DATA -26,-35,19 DATA -19,-35,26 DATA -10,-35,30 DATA 10,-30,30 DATA 19,-30,26 DATA 26,-30,19 DATA 30,-30,10 DATA 32,-30,0 DATA 30,-30,-10 DATA 26,-30,-19 DATA 19,-30,-26 DATA 10,-30,-30 DATA 0,-30,-32 DATA -10,-30,-30 DATA -19,-30,-26 DATA -26,-30,-19 DATA -30,-30,-10 DATA -32,-30,0 DATA -30,-30,10 DATA -26,-30,19 DATA -19,-30,26 DATA -10,-30,30 DATA 10,-25,29 DATA 18,-25,25 DATA 25,-25,18 DATA 29,-25,10 DATA 31,-25,0 DATA 29,-25,-10 DATA 25,-25,-18 DATA 18,-25,-25 DATA 10,-25,-29 DATA 0,-25,-31 DATA -10,-25,-29 DATA -18,-25,-25 DATA -25,-25,-18 DATA -29,-25,-10 DATA -31,-25,0 DATA -29,-25,10 DATA -25,-25,18 DATA -18,-25,25 DATA -10,-25,29 DATA 9,-20,27 DATA 16,-20,23 DATA 23,-20,16 DATA 27,-20,9 DATA 28,-20,0 DATA 27,-20,-9 DATA 23,-20,-16 DATA 16,-20,-23 DATA 9,-20,-27 DATA 0,-20,-28 DATA -9,-20,-27 DATA -16,-20,-23 DATA -23,-20,-16 DATA -27,-20,-9 DATA -28,-20,0 DATA -27,-20,9 DATA -23,-20,16 DATA -16,-20,23 DATA -9,-20,27 DATA 7,-15,23 DATA 14,-15,19 DATA 19,-15,14 DATA 23,-15,7 DATA 24,-15,0 DATA 23,-15,-7 DATA 19,-15,-14 DATA 14,-15,-19 DATA 7,-15,-23 DATA 0,-15,-24 DATA -7,-15,-23 DATA -14,-15,-19 DATA -19,-15,-14 DATA -23,-15,-7 DATA -24,-15,0 DATA -23,-15,7 DATA -19,-15,14 DATA -14,-15,19 DATA -7,-15,23 DATA 6,-10,19 DATA 12,-10,16 DATA 16,-10,12 DATA 19,-10,6 DATA 20,-10,0 DATA 19,-10,-6 DATA 16,-10,-12 DATA 12,-10,-16 DATA 6,-10,-19 DATA 0,-10,-20 DATA -6,-10,-19 DATA -12,-10,-16 DATA -16,-10,-12 DATA -19,-10,-6 DATA -20,-10,0 DATA -19,-10,6 DATA -16,-10,12 DATA -12,-10,16 DATA -6,-10,19 DATA 5,-5,14 DATA 9,-5,12 DATA 12,-5,9 DATA 14,-5,5 DATA 15,-5,0 DATA 14,-5,-5 DATA 12,-5,-9 DATA 9,-5,-12 DATA 5,-5,-14 DATA 0,-5,-15 DATA -5,-5,-14 DATA -9,-5,-12 DATA -12,-5,-9 DATA -14,-5,-5 DATA -15,-5,0 DATA -14,-5,5 DATA -12,-5,9 DATA -9,-5,12 DATA -5,-5,14 DATA 3,0,10 DATA 6,0,9 DATA 9,0,6 DATA 10,0,3 DATA 11,0,0 DATA 10,0,-3 DATA 9,0,-6 DATA 6,0,-9 DATA 3,0,-10 DATA 0,0,-11 DATA -3,0,-10 DATA -6,0,-9 DATA -9,0,-6 DATA -10,0,-3 DATA -11,0,0 DATA -10,0,3 DATA -9,0,6 DATA -6,0,9 DATA -3,0,10 DATA 2,5,8 DATA 5,5,6 DATA 6,5,5 DATA 8,5,2 DATA 8,5,0 DATA 8,5,-2 DATA 6,5,-5 DATA 5,5,-6 DATA 2,5,-8 DATA 0,5,-8 DATA -2,5,-8 DATA -5,5,-6 DATA -6,5,-5 DATA -8,5,-2 DATA -8,5,0 DATA -8,5,2 DATA -6,5,5 DATA -5,5,6 DATA -2,5,8 DATA 2,10,6 DATA 4,10,5 DATA 5,10,4 DATA 6,10,2 DATA 6,10,0 DATA 6,10,-2 DATA 5,10,-4 DATA 4,10,-5 DATA 2,10,-6 DATA 0,10,-6 DATA -2,10,-6 DATA -4,10,-5 DATA -5,10,-4 DATA -6,10,-2 DATA -6,10,0 DATA -6,10,2 DATA -5,10,4 DATA -4,10,5 DATA -2,10,6 DATA 2,15,5 DATA 3,15,4 DATA 4,15,3 DATA 5,15,2 DATA 5,15,0 DATA 5,15,-2 DATA 4,15,-3 DATA 3,15,-4 DATA 2,15,-5 DATA 0,15,-5 DATA -2,15,-5 DATA -3,15,-4 DATA -4,15,-3 DATA -5,15,-2 DATA -5,15,0 DATA -5,15,2 DATA -4,15,3 DATA -3,15,4 DATA -2,15,5 DATA 1,20,4 DATA 2,20,3 DATA 3,20,2 DATA 4,20,1 DATA 4,20,0 DATA 4,20,-1 DATA 3,20,-2 DATA 2,20,-3 DATA 1,20,-4 DATA 0,20,-4 DATA -1,20,-4 DATA -2,20,-3 DATA -3,20,-2 DATA -4,20,-1 DATA -4,20,0 DATA -4,20,1 DATA -3,20,2 DATA -2,20,3 DATA -1,20,4 DATA 2,25,5 DATA 3,25,4 DATA 4,25,3 DATA 5,25,2 DATA 5,25,0 DATA 5,25,-2 DATA 4,25,-3 DATA 3,25,-4 DATA 2,25,-5 DATA 0,25,-5 DATA -2,25,-5 DATA -3,25,-4 DATA -4,25,-3 DATA -5,25,-2 DATA -5,25,0 DATA -5,25,2 DATA -4,25,3 DATA -3,25,4 DATA -2,25,5 DATA 2,30,6 DATA 4,30,5 DATA 5,30,4 DATA 6,30,2 DATA 6,30,0 DATA 6,30,-2 DATA 5,30,-4 DATA 4,30,-5 DATA 2,30,-6 DATA 0,30,-6 DATA -2,30,-6 DATA -4,30,-5 DATA -5,30,-4 DATA -6,30,-2 DATA -6,30,0 DATA -6,30,2 DATA -5,30,4 DATA -4,30,5 DATA -2,30,6 DATA 2,35,8 DATA 5,35,6 DATA 6,35,5 DATA 8,35,2 DATA 8,35,0 DATA 8,35,-2 DATA 6,35,-5 DATA 5,35,-6 DATA 2,35,-8 DATA 0,35,-8 DATA -2,35,-8 DATA -5,35,-6 DATA -6,35,-5 DATA -8,35,-2 DATA -8,35,0 DATA -8,35,2 DATA -6,35,5 DATA -5,35,6 DATA -2,35,8 DATA 3,40,10 DATA 6,40,8 DATA 8,40,6 DATA 10,40,3 DATA 10,40,0 DATA 10,40,-3 DATA 8,40,-6 DATA 6,40,-8 DATA 3,40,-10 DATA 0,40,-10 DATA -3,40,-10 DATA -6,40,-8 DATA -8,40,-6 DATA -10,40,-3 DATA -10,40,0 DATA -10,40,3 DATA -8,40,6 DATA -6,40,8 DATA -3,40,10 DATA 4,45,11 DATA 7,45,10 DATA 10,45,7 DATA 11,45,4 DATA 12,45,0 DATA 11,45,-4 DATA 10,45,-7 DATA 7,45,-10 DATA 4,45,-11 DATA 0,45,-12 DATA -4,45,-11 DATA -7,45,-10 DATA -10,45,-7 DATA -11,45,-4 DATA -12,45,0 DATA -11,45,4 DATA -10,45,7 DATA -7,45,10 DATA -4,45,11 SUB FillChar (segment%, offset%, value%, bytes%) asm$ = "" asm$ = asm$ + CHR$(85) asm$ = asm$ + CHR$(137) + CHR$(229) asm$ = asm$ + CHR$(139) + CHR$(78) + CHR$(6) asm$ = asm$ + CHR$(139) + CHR$(86) + CHR$(8) asm$ = asm$ + CHR$(139) + CHR$(70) + CHR$(12) asm$ = asm$ + CHR$(30) asm$ = asm$ + CHR$(142) + CHR$(216) asm$ = asm$ + CHR$(139) + CHR$(94) + CHR$(10) asm$ = asm$ + CHR$(136) + CHR$(23) asm$ = asm$ + CHR$(67) asm$ = asm$ + CHR$(226) + CHR$(251) asm$ = asm$ + CHR$(31) asm$ = asm$ + CHR$(93) asm$ = asm$ + CHR$(203) DEF SEG = VARSEG(asm$) CALL Absolute(BYVAL segment%, BYVAL offset%, BYVAL value%, BYVAL bytes%, SADD(asm$)) DEF SEG END SUB SUB memcopy (fromseg%, fromoffset%, toseg%, tooffset%, bytes%) asm$ = "" asm$ = asm$ + CHR$(85) asm$ = asm$ + CHR$(137) + CHR$(229) asm$ = asm$ + CHR$(30) asm$ = asm$ + CHR$(139) + CHR$(70) + CHR$(10) asm$ = asm$ + CHR$(142) + CHR$(192) asm$ = asm$ + CHR$(139) + CHR$(70) + CHR$(14) asm$ = asm$ + CHR$(142) + CHR$(216) asm$ = asm$ + CHR$(139) + CHR$(118) + CHR$(8) asm$ = asm$ + CHR$(139) + CHR$(126) + CHR$(12) asm$ = asm$ + CHR$(139) + CHR$(78) + CHR$(6) asm$ = asm$ + CHR$(243) asm$ = asm$ + CHR$(164) asm$ = asm$ + CHR$(31) asm$ = asm$ + CHR$(93) asm$ = asm$ + CHR$(203) WAIT &H3DA, 8 DEF SEG = VARSEG(asm$) CALL Absolute(BYVAL fromseg%, BYVAL fromoffset%, BYVAL toseg%, BYVAL tooffset%, BYVAL bytes%, SADD(asm$)) DEF SEG END SUB