Barcodegolf: Generate a number's UPC
Rev 1 BBC BASIC, 155 ascii chars, tokenised filesize 132 bytes
INPUTn$
FORi=91TO185p=i MOD2j=i MOD47IFj&lt;42j+=i DIV141*42p=(j&gt;41EORASC(MID$(&quot;XLd^bFznvh&quot;,VAL(MID$(n$,j/7+1,1))+1)))&gt;&gt;(j MOD7)AND1
IFp LINEi*2,60,i*2,0
NEXT

saved a few bytes by incorporating the offset of 43 into the i loop. In order to avoid breaking the MOD2 an additional 47 had to be added for a total of 90.
This moves the barcode further from the origin, as shown, if that is acceptable:

Rev 0 BBC BASIC, 157 ascii chars, tokenised filesize 137 bytes
INPUTn$
FORi=1TO95p=i MOD2j=(i+43)MOD47IFj&lt;42j+=i DIV51*42p=(i&gt;50EORASC(MID$(&quot;XLd^bFznvh&quot;,VAL(MID$(n$,j/7+1,1))+1)))&gt;&gt;(j MOD7)AND1
IFp LINEi*2,0,i*2,60
NEXT

Download interpreter at http://www.bbcbasic.co.uk/bbcwin/bbcwin.html
The default screen mode is black text on a white background. This differs from original BBC BASC.
Ungolfed version with test printing
Calculation of a data bar depends on IF j&lt;42 and must all be done on one line. In the ungolfed version it is done in three steps. In the golfed version the last two steps are combined into a single huge expression p=...
I had to reverse the order of the bitmaps, because I use &gt;&gt;(j MOD 7) to access the bits, which means I access the least significant bit first. Once this is done, all the left bitmaps are conveniently in the ASCII range.
  INPUTn$
  FOR i=1TO95                            :REM iterate through 95 bars
    p=i MOD2                             :REM calculate colour of format bar 1=black
    j=(i+43)MOD47                        :REM repetition is 42 data bars + 5 format bars. offset and modulo. if j&lt;42 it is a data bar and we must change p.
    
    REM if i DIV 51=1 we are in the second half, so add 42 to j. Find the bitmap for left hand value, from character j/7 of the input.
    REM i&gt;50 evaluates to false=0 true=-1. XOR this with p to invert bitmap for right hand side. Shift and AND with 1.  
    IF j&lt;42 j+=i DIV51*42:p=ASC(MID$(&quot;XLd^bFznvh&quot;,  VAL(MID$(n$,j/7+1,1))+1  )) :p=(i&gt;50EORp)&gt;&gt;(j MOD7) AND 1

    IF j MOD 7 = 0 PRINT                  :REM format test output
    PRINT ;p;                             :REM print test output
    IF p LINEi*2-2,0,i*2-2,60             :REM if p=1 plot bar. there are 2 logical units for each pixel.
  NEXT

Typical output, ungolfed version, with test output