Code:
SUB BLine (x%, y%, x2%, y2%, c%)
i% = 0: steep% = 0: e% = 0
IF (x2% - x%) > 0 THEN sx% = 1: ELSE sx% = -1
dx% = ABS(x2% - x%)
IF (y2% - y%) > 0 THEN sy% = 1: ELSE sy% = -1
dy% = ABS(y2% - y%)
IF (dy% > dx%) THEN
steep% = 1
SWAP x%, y%
SWAP dx%, dy%
SWAP sx%, sy%
END IF
e% = 2 * dy% - dx%
FOR i% = 0 TO dx% - 1
IF steep% = 1 THEN PSET (y%+39, x%+1), c%: ELSE PSET (x%+39, y%+1), c%
IF steep% = 1 THEN PSET (y%*2, x%*2), c%: ELSE PSET (x%*2, y%*2), c%
IF steep% = 1 THEN PSET (y%*2+1, x%*2), c%: ELSE PSET (x%*2+1, y%*2), c%
IF steep% = 1 THEN PSET (y%*2, x%*2+1), c%: ELSE PSET (x%*2, y%*2+1), c%
IF steep% = 1 THEN PSET (y%*2+1, x%*2+1), c%: ELSE PSET (x%*2+1, y%*2+1), c%
WHILE e% >= 0
y% = y% + sy%: e% = e% - 2 * dx%
WEND
x% = x% + sx%: e% = e% + 2 * dy%
NEXT
PSET (x2%+39, y2%+1), c%
PSET (x2%*2, y2%*2), c%
PSET (x2%*2+1, y2%*2), c%
PSET (x2%*2, y2%*2+1), c%
PSET (x2%*2+1, y2%*2+1), c%
END SUB
Now it works perfectly and I am glad to say that, my program is pretty much completed and maybe now I'll just add a few more commands like drawing a box filled or unfilled.