This is just the conversion of a part of demo_simple.cpp which comes along with id3lib.
The below program displays just the title of the mp3 (not filename) and exits
;;Installing ID3Lib
;;sudo apt-get install id3 libid3-dev libid3-doc
;;Assembling and linking
;;nasm -felf32 id3demo.asm
;;gcc -o id3demo id3demo.o -lid3
%define ID3FID_TITLE 47 ;; check globals.h for other field IDs
%define ID3FN_TEXT 2
FIELDLEN equ 1024
;;External library function calls
extern ID3Tag_New
extern ID3Tag_Link
extern ID3Tag_FindFrameWithID
extern ID3Frame_GetField
extern ID3Field_GetASCII
extern printf
section .data
pID3Tag dd 0
pID3Frame dd 0
pID3Field dd 0
filename db "/home/mathi/test.mp3",0 ;;input file name
section .bss
title resb 1024 ;;reserve 1024 bytes
global main
section .text
main:
call ID3Tag_New
mov [pID3Tag], eax
push dword filename
push dword [pID3Tag]
call ID3Tag_Link
add esp, 4*2 ;;stack balancing
push dword ID3FID_TITLE
push dword [pID3Tag]
call ID3Tag_FindFrameWithID ;;find the frame with the title
add esp, 4*2
mov [pID3Frame], eax
push dword ID3FN_TEXT
push dword [pID3Frame]
call ID3Frame_GetField
add esp, 4*2
mov [pID3Field], eax
push dword FIELDLEN
push dword title
push dword [pID3Field]
call ID3Field_GetASCII ;; get the title of the mp3
add esp, 4*3
push dword title
call printf ;;print the title of the mp3
add esp, 4*1
ret ;; exit out of main