Cook the pasta in a large saucepan of boiling water according to the packet directions, until firm-tender. Add the asparagus for the last 2 minutes of cooking time. Drain.
Meanwhile, heat the oil in a large nonstick frying pan over moderate heat. Add the onion, oregano and a good grinding of pepper, and cook for 12 minutes or until the onions are golden and very tender. Add the capsicum and ham and cook for 5 minutes or until the capsicum is crisp-tender.
Add the drained pasta and asparagus, the stock, lemon zest and a pinch of salt, and simmer until the pasta is heated through. Remove from the heat and stir in the basil and lemon juice.