/* Arexx -> PPB Demo */ address command run ":ppb.dist/ppb -d43" address command waitforport PPB_RX0 if ~show('l',"rexxsupport.library") then addlib('rexxsupport.library',0,-30,0) address PPB_RX0 /* turn off the mouse pointer */ POINTER len = Length("Welcome to the ARexx -> PPB Demo!") posx = 320 - ((len * 8) / 2) text '[Welcome to the ARexx -> PPB Demo!]' posx 20 len = Length("This Macro demonstrates the commands that PPB has to offer.") posx = 320 - ((len * 8) / 2) text '[This Macro demonstrates the commands that PPB has to offer.]' posx 30 len = Length("This Text is being shown with the TEXT command.") posx = 320 - ((len * 8) / 2) text '[This Text is being shown with the TEXT command.]' posx 40 delay(50) len = Length("The CLEAR command...") posx = 320 - ((len * 8) / 2) text '[The CLEAR command...]' posx 60 delay(50) clear len = Length("The BACKCOLOR command...") posx = 320 - ((len * 8) / 2) text '[The BACKCOLOR command...]' posx 50 backcolor 1 delay(50) CLEAR len = Length("The FORECOLOR command...") posx = 320 - ((len * 8) / 2) text '[The FORECOLOR command...]' posx 50 forecolor 5 delay(50) CLEAR len = Length("The DRAW command...") posx = 320 - ((len * 8) / 2) text '[The DRAW command...]' posx 50 strt = posx-10 do i = 0 to ((len*8)+10) draw (strt+i) 60 end delay(50) CLEAR len = Length("The LINE command...") posx = 320 - ((len * 8) / 2) x = posx-10 text '[The LINE command...]' posx 50 LINE x 40 x 60 LINE x 60 x+30 60 delay(50) clear len = Length("The RECTANGLE command...") posx = 320 - ((len * 8) / 2) text '[The RECTANGLE command...]' posx 50 strt = posx-10 RECTANGLE strt 40 len*8+10 60 delay(50) clear len = Length("The ELLIPSE command...") posx = 320 - ((len * 8) / 2) text '[The ELLIPSE command...]' posx 50 ELLIPSE 320 46 (len+20) 20 delay(50) clear len = Length("The FILL command...") posx = 320 - ((len * 8) / 2) text '[The FILL command...]' posx 50 RECTANGLE (posx-10) 40 ((len*8)+10) 60 delay(50) FORECOLOR 6 FILL RECTANGLE (posx-10) 40 ((len*8)+10) 60 FORECOLOR 1 delay(50) clear len = Length("The HTOOLS command...") posx = 320 - ((len * 8) / 2) text '[The HTOOLS command...]' posx 50 HTOOLS DELAY(50) len = Length("The STOOLS command...") posx = 320 - ((len * 8) / 2) text '[The STOOLS command...]' posx 50 STOOLS DELAY(50) len = Length("The HPPB command...") posx = 320 - ((len * 8) / 2) text '[The HPPB command...]' posx 50 DELAY(50) HPPB DELAY(50) SPPB len = Length("The SPPB command...") posx = 320 - ((len * 8) / 2) text '[The SPPB command...]' posx 50 DELAY(50) len = Length("The SWAPBITMAP command...") posx = 320 - ((len * 8) / 2) text '[The SWAPBITMAP command...]' posx 50 len = Length("BITMAP 1") posx = 320 - ((len * 8) / 2) FORECOLOR 5 text '[BITMAP 1]' posx 60 DELAY(50) SWAPBITMAP len = Length("The SWAPBITMAP command...") posx = 320 - ((len * 8) / 2) text '[The SWAPBITMAP command...]' posx 50 len = Length("BITMAP 2") posx = 320 - ((len * 8) / 2) FORECOLOR 4 text '[BITMAP 2]' posx 60 DELAY(70) SWAPBITMAP FORECOLOR 1 DELAY(50) clear len = Length("The DFONT command...") posx = 320 - ((len * 8) / 2) text '[The DFONT command...]' posx 50 DFONT '[diamond.font]' 20 len = Length("Diamond Font 20") posx = 320 - ((len * 12) / 2) text '[Diamond Font 20]' posx 100 DELAY(50) clear RFONT '[topaz.font]' 8 len = Length("The RFONT command...") posx = 320 - ((len * 8) / 2) text '[The RFONT command...]' posx 50 len = Length("Topaz Font 8") posx = 320 - ((len * 12) / 2) text '[Topaz Font 8]' posx 100 DELAY(50) clear fill len = Length("The BRUSH command...") posx = 320 - ((len * 8) / 2) text '[The BRUSH command...]' posx 50 forecolor 1 rectangle 0 0 10 10 forecolor 2 line 0 0 10 10 forecolor 3 line 0 10 10 0 brush 0 0 10 10 delay (50) len = Length("The SBRUSH command...") posx = 320 - ((len * 8) / 2) text '[The SBRUSH command...]' posx 50 sbrush '[ram:test.b]' len = Length("The OPENPIC command...") posx = 320 - ((len * 8) / 2) text '[The OPENPIC command...]' posx 50 DELAY(40) OPENPIC '[:ppb.dist/Example_Interface.h_2.pic]' DELAY(40) CLEAR HTOOLS len = Length("The ENDPPB command...") posx = 320 - ((len * 8) / 2) text '[The ENDPPB command...]' posx 15 DELAY(40) CLEAR len = Length("GOOD BYE") posx = 320 - ((len * 8) / 2) DFONT '[diamond.font]' 20 FORECOLOR 1 text '[GOOD BYE]' posx 190 delay(70) endppb