Your code looks decent, just changing the tilemapper from pixel to whole-byte would speed everything up quite nicely. Basically the idea is that instead of using a pic and using pxl-test, you use a series of bytes to define your data.
So if your tilemap was a big box say, 8x8 in size the data might look like this:
0101010101010101
0100000000000001
0100000000000001
0100000000000001
0100000000000001
0100000000000001
0100000000000001
0101010101010101
where 1 is a wall and 0 is empty space. Then to draw it, you use something similar to what you had, only simplified for full byte tiles (and unoptimized for readability)
for(a,0,11)
for(b,0,7)
pt-on(a*8+s,v*8,{b+y*w+x+b+gdb1}*8+Pic0
end
end
where gdb1 points to your tilemap data, pic0 are your tiles, and w is your tilemap width. What you're doing, in essence, is modeling a 2d matrix.