Well, I finally got it to work with the technique used by ZXDunny.
REM Code 39 Barcode generator, by ZXDunny
// Adapted to Yabasic by Galileo, 02/2018, v2
open window 500, 100
data 265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,52,289,97,352,49,304,112,37,292,100,196,133,168,42,388,162,138,148
a$ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 -$%./+*"
n = len(a$)
dim a(n)
black$ = "0,0,0"
white$ = "255,255,255"
for i = 1 to n
read a(i)
next i
x = 10
INPUT "Phrase: " p$ // test "ABC123"
p$ = "*" + upper$(p$) + "*"
l = LEN(p$)
FOR f = 1 TO l
c$ = mid$(p$, f, 1)
c = instr(a$, c$ )
IF c = 0 PRINT "Error in input" : end
d = a(c)
FOR g = 8 to 0 step -1
if and(d, (shl(1, g))) then
b = 3
else
b = 1
end if
if mod(g, 2) then
color white$
else
color black$
end if
fill RECTANGLE x, 10 TO x + b, 50
x = x + b + 1
NEXT g
x = x + 2
NEXT f
color black$ : text 10, 70, p$
sub shl(lhs, rhs)
return Int(lhs * 2 ^ rhs)
end sub