10 rem bresenham line algorihm 20 rem translated from purebasic 30 x0=10 : rem start x co-ord 40 y0=15 : rem start y co-ord 50 x1=30 : rem end x co-ord 60 y1=20 : rem end y co-ord 70 se=0 : rem 0 = steep 1 = !steep 80 ns=25 : rem num segments 90 dim pt(ns,2) : rem points in line 100 sc=1024 : rem start of screen memory 110 sw=40 : rem screen width 120 sh=25 : rem screen height 130 pc=42 : rem plot character '*' 140 gosub 1000 150 end 1000 rem plot line 1010 if abs(y1-y0)>abs(x1-x0) then se=1:tp=y0:y0=x0:x0=tp:tp=y1:y1=x1:x1=tp 1020 if x0>x1 then tp=x1:x1=x0:x0=tp:tp=y1:y1=y0:y0=tp 1030 dx=x1-x0 1040 dy=abs(y1-y0) 1050 er=dx/2 1060 y=y0 1070 ys=-1 1080 if y0