svga256.bgi putimage

Does anybody have a routine or a procedure which would do the same job as
put/getimage, but in 256 color mode. I'm using svga256.bgi (mode 4, ie.
1024x768x256) instead of the standard egavga.bgi, but the original
procedures don't work 'couse of the color mode.